aboutsummaryrefslogtreecommitdiffstats
path: root/Assets/Scripts/Items/Whip.cs
diff options
context:
space:
mode:
authorToby Vincent <tobyv13@gmail.com>2022-04-12 22:41:11 -0500
committerToby Vincent <tobyv13@gmail.com>2022-04-12 22:41:11 -0500
commita820d2892f7c44ef4e5ddd76a6973adb38e9bfa4 (patch)
tree5abe8294eb4cb32efb54b5c619eabd971241bb0a /Assets/Scripts/Items/Whip.cs
parent51f2bf4415d0c1441d9c72fbb5f2b5895fd24456 (diff)
feat: add actor/item prototypes
Diffstat (limited to 'Assets/Scripts/Items/Whip.cs')
-rw-r--r--Assets/Scripts/Items/Whip.cs29
1 files changed, 29 insertions, 0 deletions
diff --git a/Assets/Scripts/Items/Whip.cs b/Assets/Scripts/Items/Whip.cs
new file mode 100644
index 0000000..1a675ce
--- /dev/null
+++ b/Assets/Scripts/Items/Whip.cs
@@ -0,0 +1,29 @@
+using UnityEngine;
+
+namespace MontanaJohns.Items
+{
+ public class Whip : Active
+ {
+ public GameObject hook;
+ public bool ropeExists = false;
+
+ GameObject currentHook;
+
+ // Update is called once per frame
+ public override void Use()
+ {
+ if (!ropeExists)
+ {
+ // Vector2 clickLocation = Mouse.current.position;
+
+ // currentHook = (GameObject)Instantiate(hook, clickLocation, Quaternion.identity);
+ ropeExists = true;
+ }
+ else
+ {
+ Destroy(currentHook);
+ ropeExists = false;
+ }
+ }
+ }
+} \ No newline at end of file