GetSpellOfType() public method

public GetSpellOfType ( string type ) : Spell,
type string
return Spell,
Esempio n. 1
0
    private void GetNextSpellOrEndGame(string spellType = null)
    {
        Spell nextSpell;

        if (string.IsNullOrEmpty(spellType))
        {
            nextSpell = spellList.GetNextSpell();
        }
        else
        {
            nextSpell = spellList.GetSpellOfType(spellType);
        }

        curSpell = nextSpell;

        if (nextSpell != null)
        {
            nextSpell.OnStateChange += OnSpellOver;
            nextSpell.StartSpell();
        }
        else
        {
            EndGame();
        }
    }