Example #1
0
 protected void OnTriggerEnter(Collider other)
 {
     if (other.tag.Contains("Entity") && !other.tag.Contains("Tower"))
     {
         BaseEntity enemy = other.gameObject.GetComponentInParent <BaseEntity>();
         if (enemy.CanBeTarget(projectile))
         {
             _inRange.Add(other.gameObject.GetComponent <BaseEntity>());
         }
     }
 }