summaryrefslogtreecommitdiff
path: root/Client/Assembly-CSharp/TumbleBoxBehaviour.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Client/Assembly-CSharp/TumbleBoxBehaviour.cs')
-rw-r--r--Client/Assembly-CSharp/TumbleBoxBehaviour.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/Client/Assembly-CSharp/TumbleBoxBehaviour.cs b/Client/Assembly-CSharp/TumbleBoxBehaviour.cs
new file mode 100644
index 0000000..8d9f722
--- /dev/null
+++ b/Client/Assembly-CSharp/TumbleBoxBehaviour.cs
@@ -0,0 +1,24 @@
+using System;
+using UnityEngine;
+
+public class TumbleBoxBehaviour : MonoBehaviour
+{
+ public FloatRange BoxHeight;
+
+ public FloatRange shadowScale;
+
+ public SpriteRenderer Shadow;
+
+ public SpriteRenderer Box;
+
+ public void FixedUpdate()
+ {
+ float z = Time.time * 15f;
+ float v = Mathf.Cos(Time.time * 3.1415927f / 10f) / 2f + 0.5f;
+ float num = this.shadowScale.Lerp(v);
+ this.Shadow.transform.localScale = new Vector3(num, num, num);
+ float y = this.BoxHeight.Lerp(v);
+ this.Box.transform.localPosition = new Vector3(0f, y, -0.01f);
+ this.Box.transform.eulerAngles = new Vector3(0f, 0f, z);
+ }
+}