コード例 #1
0
ファイル: EnemyAI.cs プロジェクト: Darruma/Ricochet
 void OnTriggerEnter(Collider col)     // check if bullet has collided with enemy
 {
     if (col.gameObject.tag == "Bullet")
     {
         soundDeath.DeathSound();
         StartCoroutine("Death");
     }
     if (col.gameObject.tag == "Barrel")
     {
         soundDeath.DeathSound();
         StartCoroutine("Death");
     }
 }