29 lines
748 B
C#
29 lines
748 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
// Token: 0x020000EE RID: 238
|
|
public class TranslateShaderOffset : MonoBehaviour
|
|
{
|
|
// Token: 0x06001548 RID: 5448 RVA: 0x00198368 File Offset: 0x00196568
|
|
private void Start()
|
|
{
|
|
this.offset = base.GetComponent<Renderer>().material.GetTextureOffset(this.propertyName);
|
|
}
|
|
|
|
// Token: 0x06001549 RID: 5449 RVA: 0x00198386 File Offset: 0x00196586
|
|
private void Update()
|
|
{
|
|
this.offset += this.velocity * Time.deltaTime;
|
|
base.GetComponent<Renderer>().material.SetTextureOffset(this.propertyName, this.offset);
|
|
}
|
|
|
|
// Token: 0x04002526 RID: 9510
|
|
public string propertyName = "_MainTex";
|
|
|
|
// Token: 0x04002527 RID: 9511
|
|
public Vector2 velocity;
|
|
|
|
// Token: 0x04002528 RID: 9512
|
|
private Vector2 offset;
|
|
}
|