Beispiel #1
0
    //Sets all menus to false except the currentMenu
    public void setMenuActive(menuNames currentMenu)
    {
        //set all menus to false
        creditsMenu.SetActive(false);
        levelSelectMenu.SetActive(false);
        mainMenu.SetActive(false);
        modeMenu.SetActive(false);
        settingsMenu.SetActive(false);
        audioMenu.SetActive(false);
        videoMenu.SetActive(false);
        controlMenu.SetActive(false);

        switch (currentMenu)
        {
        case menuNames.CreditsMenu:
            creditsMenu.SetActive(true);
            break;

        case menuNames.ControlMenu:
            controlMenu.SetActive(true);
            break;

        case menuNames.LevelSelectMenu:
            levelSelectMenu.SetActive(true);
            break;

        case menuNames.MainMenu:
            mainMenu.SetActive(true);
            break;

        case menuNames.ModeMenu:
            modeMenu.SetActive(true);
            break;

        case menuNames.AudioMenu:
            audioMenu.SetActive(true);
            break;

        case menuNames.SettingsMenu:
            settingsMenu.SetActive(true);
            break;

        case menuNames.VideoMenu:
            videoMenu.SetActive(true);
            break;

        default:
            Debug.Log("missing menu in MainMenu_Controller");
            break;
        }
    }
Beispiel #2
0
    //Sets all menus to false except the currentMenu
    public void setMenuActive(menuNames currentMenu)
    {
        //set all menus to false
        pauseMenu.SetActive(false);
        quitMenu.SetActive(false);
        settingsMenu.SetActive(false);
        audioMenu.SetActive(false);
        videoMenu.SetActive(false);
        controlMenu.SetActive(false);
        endLevelMenu.SetActive(false);

        switch (currentMenu)
        {
        case menuNames.PauseMenu:
            pauseMenu.SetActive(true);
            break;

        case menuNames.ControlMenu:
            controlMenu.SetActive(true);
            break;

        case menuNames.QuitMenu:
            quitMenu.SetActive(true);
            break;

        case menuNames.AudioMenu:
            audioMenu.SetActive(true);
            break;

        case menuNames.VideoMenu:
            videoMenu.SetActive(true);
            break;

        case menuNames.SettingsMenu:
            settingsMenu.SetActive(true);
            break;

        case menuNames.EndLevelMenu:
            endLevelMenu.SetActive(true);
            break;

        default:
            Debug.Log("missing menu in Pause");
            break;
        }
    }