public static void TakeDamage(this ICharacterClass characterClass, float damage) { if (characterClass.CheckIfDead() == false) { if (characterClass.CheckIfContainsCondition <DamageReduction>()) { Debug.Log("Hitting player on Damage reduction"); } characterClass.SetCurrentHealth(characterClass.GetCurrentHealth() - damage); if (characterClass.CheckIfDead()) { if (OnPlayerDeath != null) { OnPlayerDeath.Invoke(characterClass); } } characterClass.GetStatusBarManager().PerformValueChangeTextEffectWithColor(damage, StateValueChangeAction.TakingDamage); } }