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