Beispiel #1
0
 protected void OnTriggerEnter(Collider other)
 {
     if (other.tag == "Player")
     {
         MovePlayer mp = other.GetComponent <MovePlayer>();
         PlayerEnter();
         mp.ActionChanged(Action, ActionName, true);
     }
 }
Beispiel #2
0
 protected void OnTriggerExit(Collider other)
 {
     if (other.tag == "Player")
     {
         MovePlayer mp = other.GetComponent <MovePlayer>();
         if (mp.CurrentAction == Action)
         {
             mp.ActionChanged(Action, null, false);
         }
     }
 }