Beispiel #1
0
 void OnTriggerEnter2D(Collider2D collision)
 {
     if (hitIds.FindIndex(id => id == collision.gameObject.GetInstanceID()) == -1)
     {
         hitIds.Add(collision.gameObject.GetInstanceID());
         commandPunch.Hit(collision.gameObject);
     }
 }
Beispiel #2
0
 void OnTriggerEnter2D(Collider2D collision)
 {
     commandPunch.Hit(collision.gameObject);
 }