summaryrefslogtreecommitdiff
path: root/Thronefall_v1.0/Decompile/RiverScroller.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Thronefall_v1.0/Decompile/RiverScroller.cs')
-rw-r--r--Thronefall_v1.0/Decompile/RiverScroller.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/Thronefall_v1.0/Decompile/RiverScroller.cs b/Thronefall_v1.0/Decompile/RiverScroller.cs
new file mode 100644
index 0000000..65f9f3c
--- /dev/null
+++ b/Thronefall_v1.0/Decompile/RiverScroller.cs
@@ -0,0 +1,18 @@
+using UnityEngine;
+
+public class RiverScroller : MonoBehaviour
+{
+ public Material mat;
+
+ public float speed;
+
+ public string propertyName;
+
+ private float xOffset;
+
+ private void Update()
+ {
+ xOffset += Time.deltaTime * speed;
+ mat.SetTextureOffset(propertyName, new Vector2(xOffset, 0f));
+ }
+}