Пример #1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other != null)
     {
         IPowerUp cannon = other.GetComponentInChildren <IPowerUp>();
         if (cannon != null)
         {
             cannon.Shoot();
             cannon = null;
         }
     }
 }