using System; using UnityEngine; namespace FX { // Token: 0x0200075D RID: 1885 public class FX_CopyMat_UVAdd : MonoBehaviour { // Token: 0x06003033 RID: 12339 RVA: 0x00102798 File Offset: 0x00102798 private void Start() { Renderer component = base.GetComponent(); this._material = ((!(component != null)) ? null : component.material); if (this._material != null) { this._material.SetTextureOffset(this.TextureName, Vector2.zero); } } // Token: 0x06003034 RID: 12340 RVA: 0x001027F4 File Offset: 0x001027F4 private void Update() { if (this._material != null) { this._x = Mathf.Repeat(this._x + 60f * Time.deltaTime * this.addSpeedX, 1f); this._y = Mathf.Repeat(this._y + 60f * Time.deltaTime * this.addSpeedY, 1f); Vector2 value = new Vector2(this._x, this._y); this._material.SetTextureOffset(this.TextureName, value); } } // Token: 0x04005612 RID: 22034 [SerializeField] private string TextureName = "_MainTex"; // Token: 0x04005613 RID: 22035 [SerializeField] private float addSpeedX; // Token: 0x04005614 RID: 22036 [SerializeField] private float addSpeedY; // Token: 0x04005615 RID: 22037 private Material _material; // Token: 0x04005616 RID: 22038 private float _x; // Token: 0x04005617 RID: 22039 private float _y; } }