summaryrefslogtreecommitdiff
path: root/GameCode/PlayerDoJump.cs
diff options
context:
space:
mode:
Diffstat (limited to 'GameCode/PlayerDoJump.cs')
-rw-r--r--GameCode/PlayerDoJump.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/GameCode/PlayerDoJump.cs b/GameCode/PlayerDoJump.cs
new file mode 100644
index 0000000..9d718be
--- /dev/null
+++ b/GameCode/PlayerDoJump.cs
@@ -0,0 +1,18 @@
+using UnityEngine;
+
+public class PlayerDoJump : MonoBehaviour
+{
+ private PlayerJump jump;
+
+ public float multiplier = 0.25f;
+
+ private void Start()
+ {
+ jump = GetComponentInParent<PlayerJump>();
+ }
+
+ public void DoJump()
+ {
+ jump.Jump(forceJump: true, multiplier);
+ }
+}