Ejemplo n.º 1
0
 //This target only interacts with enemy layer (set in Unity's physics)
 public void OnTriggerEnter(Collider other)
 {
     if (other.GetEnemy() == targetEnemy)
     {
         Destroy(gameObject);
     }
 }