示例#1
0
    public void switchSkill()
    {
        if (skillsQueue.Count > 0)
        {
            switch (skillsQueue.Dequeue())
            {
            case SkillsNames.Freeze:
                player.Freez();
                changeSpriteAfterUse();
                break;

            case SkillsNames.Wind:
                player.Wind();
                changeSpriteAfterUse();
                break;

            case SkillsNames.Stone:
                player.Stone();
                changeSpriteAfterUse();
                break;

            case SkillsNames.Fly:
                player.Fly();
                changeSpriteAfterUse();
                break;

            case SkillsNames.SmallSize:
                player.SmallSize();
                changeSpriteAfterUse();
                break;

            default:
                Debug.Log("No skill");
                break;
            }
        }
        else
        {
            Debug.Log("No skill stack");
        }
    }