public static Spell CreateSpell(RightHandCaster.Spells spell) { switch (spell) { case RightHandCaster.Spells.Fire: return(new FireSpell()); case RightHandCaster.Spells.Levitate: return(new LevitateSpell()); case RightHandCaster.Spells.Teleport: return(new TeleportSpell()); } Debug.Log($"No current spell ready for spell enum {spell}"); return(null); }
/// <summary> /// Set the spell being hold in the wand, including setting the particles /// </summary> /// <param name="spell"></param> public void StartSpell(RightHandCaster.Spells spell) { Debug.Log($"Starting {spell}"); currSpellHeld = spell; WandParticles[(int)spell]?.SetActive(true); }