예제 #1
0
    private void CastSpellAttacks()
    {
        if (!open && Active)
        {
            if (Input.GetKeyDown(KeyCode.Alpha1))
            {
                spellBook.CastSpellMain(0);
            }
            if (Input.GetKeyDown(KeyCode.Alpha2))
            {
                spellBook.CastSpellMain(1);
            }
            if (Input.GetKeyDown(KeyCode.Alpha3))
            {
                spellBook.CastSpellMain(2);
            }
        }

        if (spellBook.castingProgess)
        {
            state = State.Casting;
            StartCoroutine(UtilClass.Wait(0.5f, () => state = State.Normal));
            spellBook.castingProgess = false;
        }
        else
        {
            state = State.Normal;
        }
    }