FiE-Game/Assets/Scripts/TwilightMagicSphereNormal.cs

15 lines
349 B
C#
Raw Normal View History

2018-11-20 20:10:49 +01:00
using UnityEngine;
2018-11-21 21:16:20 +01:00
public class TwilightMagicSphereNormal : MonoBehaviour {
private float angle;
2018-11-20 20:10:49 +01:00
2018-11-21 21:16:20 +01:00
private void Start() {
}
2018-11-20 20:10:49 +01:00
2018-11-21 21:16:20 +01: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 20:10:49 +01:00
}