Beispiel #1
0
 void OnTriggerExit2D(Collider2D collider)
 {
     if (collider.tag == "Player")
     {
         control.SetCharacterInRange(null);
     }
 }
Beispiel #2
0
 void OnTriggerEnter2D(Collider2D collider)
 {
     if (collider.tag == "Player")
     {
         m_Control.SetCharacterInRange(collider.gameObject);
     }
 }
 private void OnTriggerEnter2D(Collider2D collider)
 {
     if (collider.tag == "Player")
     {
         m_Control.SetCharacterInRange(collider.gameObject);                           //If the collider belongs to the player, get ready to chase
     }
 }
Beispiel #4
0
 void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.tag == "Player")
     {
         m_Control.SetCharacterInRange(collision.gameObject);
         m_MyCollider.radius = DetectedSize;
     }
 }