Exemple #1
0
 private void OnCollisionEnter(Collision collision)
 {
     Abstracts.Interactable interactable = collision.gameObject.GetComponent <Abstracts.Interactable>();
     if (interactable != null)
     {
         if (interactable.IsInteractable())
         {
             interactable.OnTouchEnter(collision, gameObject);
         }
     }
 }
Exemple #2
0
 private void OnTriggerExit(Collider other)
 {
     Abstracts.Interactable interactable = other.gameObject.GetComponent <Abstracts.Interactable>();
     if (interactable != null)
     {
         if (interactable.IsInteractable())
         {
             interactable.OnTouchTriggerExit(other, gameObject);
         }
     }
 }