Esempio n. 1
0
    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);
    }
Esempio n. 2
0
 /// <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);
 }