コード例 #1
0
 void OnTriggerEnter(Collider other)
 {
     // If the entering collider is the player...
     if (other.gameObject.tag == "Player")
     {
         // ... the player is in range.
         enemyHealth.ChangeHealth(100);
         enemyHealth.makeExplosion = false;
         playerHealth.TakeDamage(healthDamage);
     }
 }