Exemple #1
0
 void OnTriggerExit2D(Collider2D other)
 {
     if (isUsing && null != collidingWith)
     {
         collidingWith.StopUsing(gameObject);
     }
     collidingWith = null;
 }
Exemple #2
0
 void OnTriggerEnter2D(Collider2D other)
 {
     collidingWith = other.gameObject.GetComponent <UsableObjectCS> ();
 }