FiE-Game/Assets/Scripts/TwilightMagicSphereNormal.cs

15 lines
349 B
C#
Raw Normal View History

2018-11-20 21:10:49 +02:00
using UnityEngine;
2018-11-21 22:16:20 +02:00
public class TwilightMagicSphereNormal : MonoBehaviour {
private float angle;
2018-11-20 21:10:49 +02:00
2018-11-21 22:16:20 +02:00
private void Start() {
}
2018-11-20 21:10:49 +02:00
2018-11-21 22:16:20 +02:00
private void Update() {
angle = Mathf.Repeat(angle + 0.9f * Time.deltaTime, 1f);
gameObject.GetComponent<Renderer>().material.SetTextureOffset("_BumpMap", new Vector2(0 - angle, 1));
}
2018-11-20 21:10:49 +02:00
}