public void Damage(IDamageSource source)
        {
            if (source == null)
            {
                return;
            }

            float damage = Mathf.Abs(source.BaseDamage);

            foreach (var modifier in _damageModifiers)
            {
                damage = modifier(source, damage);
            }

            HandleDamage(source, damage);
            OnDamage.SafeInvoke(source, damage);
        }
Example #2
0
 public void Damage(float damage)
 {
     OnDamage.SafeInvoke(damage);
 }