Пример #1
0
 private void OnTriggerEnter(Collider other)
 {
     hpComponent = other.GetComponent <HealthComponent>();
     if (hpComponent && !hpComponent.IsFriendlyFire(damageInfo))
     {
         hpComponent.TakeDamage(damageInfo);
         OnDealDamageEvent.Invoke(hpComponent);
     }
 }