public void Init(GameObject grapnel, Vector3 direction) { this.grapnel = grapnel.GetComponent <GrapnelController>(); rb = GetComponent <Rigidbody>(); rb.AddForce(direction * speed, ForceMode.Force); isFlying = true; lineRenderer = GetComponent <LineRenderer>(); }
public override void Use() { if (!isCurrentlyUsed) { durability--; this.isCurrentlyUsed = true; grapnel = this.player.GetComponent <PlayerControl>().hand.transform.Find("h_Grapnel").GetComponent <GrapnelController>(); grapnel.Shoot(this); } }