Beispiel #1
0
 private void OnTriggerStay2D(Collider2D collision)
 {
     if (collision.GetComponent <NavigatorScript>())
     {
         CurrentNavigator = collision.GetComponent <NavigatorScript>();
     }
 }
Beispiel #2
0
 private void OnTriggerExit2D(Collider2D collision)
 {
     if (collision.GetComponent <DoorScript>())
     {
         CurrentDoor = null;
     }
     else if (collision.GetComponent <NavigatorScript>())
     {
         CurrentNavigator = null;
     }
 }