示例#1
0
    /// <summary>
    /// sets the current menu and plays the animation for the menu transition
    /// </summary>
    /// <param name="menu">which menu to transition to</param>
    public void menuTransition(MENU menu)
    {
        switch (menu)
        {
        case MENU.MAIN:
            currentMenu = MENU.MAIN;
            MA.playTransToMainMenu();
            break;

        case MENU.SCENARIO:
            if (currentMenu == MENU.MAIN)
            {
                currentMenu = MENU.SCENARIO;
                MA.playTransToScenario();
            }
            else if (currentMenu == MENU.INSTRUCTION)
            {
                currentMenu = MENU.SCENARIO;
                MA.playTransToScenarioFromInstructions();
            }
            break;

        case MENU.INSTRUCTION:
            currentMenu = MENU.INSTRUCTION;
            MA.playTransToScenarioInstructions();
            break;
        }
    }