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; } } } }