示例#1
0
        public void TakeDamage(float damage)
        {
            HealthSystemSystem.TakeDamage(damage);
            OnHealthChangedEvent?.Invoke(this, GetPercentageHealth());

            if (HealthSystemSystem.HealthPoints == 0 && IsAlive)
            {
                TriggerDeath();
            }
        }
示例#2
0
 protected void HealDamage(float amountToHeal)
 {
     HealthSystemSystem.Heal(amountToHeal, stats.GetStat(Stat.Health));
     OnHealthChangedEvent?.Invoke(this, GetPercentageHealth());
 }