Beispiel #1
0
 public void Release()
 {
     Collider[] colliders = Physics.OverlapSphere(Hands.position, GrabRange, WhereCanRelease);
     if (colliders.Length > 0 && !canTakeItems)
     {
         var interactable = colliders[0].gameObject.GetComponent <IInteractable>();
         if (interactable != null)
         {
             if (interactable.SetIdol(itemInHands.GetComponent <Idol>(), this))
             {
                 Image.ChangeImageState();
                 audioSource.clip = audioFx.iteraction;
                 audioSource.Play();
                 canTakeItems = true;
                 itemInHands  = null;
             }
         }
     }
 }