private IEnumerator TemporaryBonusEffect(Character.Character c, BonusSpell spell) { ApplyBonus(c, spell.bonusType, spell.bonusValue); yield return(new WaitForSeconds(spell.duration)); RemoveBonus(c, spell.bonusType, spell.bonusValue); }
private void BonusSpellEffect(BonusSpell spell) { Character.Character charac = FindObjectOfType <Character.Character>(); if (spell.isPermanent) { ApplyBonus(charac, spell.bonusType, spell.bonusValue); } else { TemporaryBonusEffect(charac, spell); } }