public void PlaySpell(SpellSystem.SpellCreator spell) { spellAudio.loop = false; spellAudio.clip = spell.spellSound; spellAudio.Play(); }
// 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); }