summaryrefslogtreecommitdiff
path: root/ROUNDS/CapScale.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ROUNDS/CapScale.cs')
-rw-r--r--ROUNDS/CapScale.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/ROUNDS/CapScale.cs b/ROUNDS/CapScale.cs
new file mode 100644
index 0000000..bcb62a0
--- /dev/null
+++ b/ROUNDS/CapScale.cs
@@ -0,0 +1,20 @@
+using UnityEngine;
+
+public class CapScale : MonoBehaviour
+{
+ public float min = 2f;
+
+ public float max = 10f;
+
+ private void Start()
+ {
+ if (base.transform.localScale.x < min)
+ {
+ base.transform.localScale = Vector3.one * min;
+ }
+ if (base.transform.localScale.x > max)
+ {
+ base.transform.localScale = Vector3.one * max;
+ }
+ }
+}