Exemplo n.º 1
0
 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>();
 }
Exemplo n.º 2
0
 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);
     }
 }