示例#1
0
        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);
        }
示例#2
0
        private void BonusSpellEffect(BonusSpell spell)
        {
            Character.Character charac = FindObjectOfType <Character.Character>();

            if (spell.isPermanent)
            {
                ApplyBonus(charac, spell.bonusType, spell.bonusValue);
            }
            else
            {
                TemporaryBonusEffect(charac, spell);
            }
        }