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