FiE-Game/src/Fie.Ponies.Twilight/FieTwilightBigLaserUvOffset.cs

17 lines
359 B
C#
Raw Normal View History

2018-11-20 20:10:49 +01:00
using UnityEngine;
namespace Fie.Ponies.Twilight
{
public class FieTwilightBigLaserUvOffset : MonoBehaviour
{
private float _offsetX;
private void Update()
{
_offsetX -= 1.5f * Time.deltaTime;
GetComponent<Renderer>().material.SetVector("_texUV", new Vector4(_offsetX, 0f, 0f, 0f));
base.transform.Rotate(new Vector3(1f, 0f, 0f));
}
}
}