IEnumerator StunTimer(AbilitiesAndStatusEffects effect) { yield return(new WaitForSeconds(effect.GetStatusEffectLifeTime())); isStunned = false; GetComponent <DefenceApplicator>().RemoveStatusEffect(effect.GetStatusEffect()); }
IEnumerator ProcessPoison(AbilitiesAndStatusEffects effect) { for (int i = 0; i < effect.GetStatusEffectLifeTime(); i++) { yield return(new WaitForSeconds(1)); LoseHealth(effect.GetStatusEffectDamage()); } GetComponent <DefenceApplicator>().RemoveStatusEffect(effect.GetStatusEffect()); }