public void PlaySpell(SpellSystem.SpellCreator spell)
        {
            spellAudio.loop = false;

            spellAudio.clip = spell.spellSound;
            spellAudio.Play();
        }
示例#2
0
        // V V V Checks if spell is in cooldown
        public bool SpellCooldownCheck(SpellSystem.SpellCreator spell)
        {
            if (spell.spellInitialCooldowncounter > 0)
            {
                return(false);
            }
            if (spell.spellCastPerturncounter >= spell.spellCastPerturn && spell.spellCastPerturn != 0)
            {
                return(false);
            }
            if (spell.spellCooldownLeft > 0)
            {
                return(false);
            }

            return(true);
        }