コード例 #1
0
 void OnTriggerEnter2D(Collider2D col)
 {
     if (col.tag == "Ship" && m_mine.CanBoom)
     {
         m_mine.TriggerDetonationAnim();
         StartCoroutine(DetonationDelay());
     }
 }
コード例 #2
0
 private void TriggerDetonation(string tag)
 {
     if (m_triggered)
     {
         // Early return
         return;
     }
     if (tag == "Ship" && m_mine.CanBoom)
     {
         m_mine.TriggerDetonationAnim();
         StartCoroutine(DetonationDelay());
     }
 }