Esempio n. 1
0
    public void SetGameState(GameState state)
    {
        switch (state)
        {
        case GameState.MainMenu:
            MenuGroup.SetActive(true);
            GamePlayGroup.DeActivate();
            break;

        case GameState.Playing:
            MenuGroup.SetActive(false);
            GamePlayGroup.Activate();
            break;

        default:
            break;
        }
    }
Esempio n. 2
0
    public void SetMenuState(MenuState state)
    {
        switch (state)
        {
        default:
        case MenuState.StartUp:
            TitleText.SetActive(true);
            StartUpMenu.SetActive(true);
            LogInMenu.SetActive(false);
            SignUpMenu.SetActive(false);
            GameMenu.SetActive(false);
            TimeTrialMenu.SetActive(false);
            QC.DeActivate();
            break;

        case MenuState.LogIn:
            TitleText.SetActive(true);
            StartUpMenu.SetActive(false);
            LogInMenu.SetActive(true);
            SignUpMenu.SetActive(false);
            GameMenu.SetActive(false);
            TimeTrialMenu.SetActive(false);
            QC.DeActivate();
            break;

        case MenuState.SignUp:
            TitleText.SetActive(true);
            StartUpMenu.SetActive(false);
            LogInMenu.SetActive(false);
            SignUpMenu.SetActive(true);
            GameMenu.SetActive(false);
            TimeTrialMenu.SetActive(false);
            QC.DeActivate();
            break;

        case MenuState.Game:
            TitleText.SetActive(true);
            StartUpMenu.SetActive(false);
            LogInMenu.SetActive(false);
            SignUpMenu.SetActive(false);
            GameMenu.SetActive(true);
            TimeTrialMenu.SetActive(false);
            QC.DeActivate();
            break;

        case MenuState.TimeTrial:
            TitleText.SetActive(true);
            StartUpMenu.SetActive(false);
            LogInMenu.SetActive(false);
            SignUpMenu.SetActive(false);
            GameMenu.SetActive(false);
            TimeTrialMenu.SetActive(true);
            TimeTrialMenu.GetComponent <TimeTrialMenuController>().RandomGame = false;
            TimeTrialMenu.GetComponent <TimeTrialMenuController>().PokemonNameInput.gameObject.SetActive(true);
            QC.DeActivate();
            break;

        case MenuState.Random:
            TitleText.SetActive(true);
            StartUpMenu.SetActive(false);
            LogInMenu.SetActive(false);
            SignUpMenu.SetActive(false);
            GameMenu.SetActive(false);
            TimeTrialMenu.SetActive(true);
            TimeTrialMenu.GetComponent <TimeTrialMenuController>().RandomGame = true;
            TimeTrialMenu.GetComponent <TimeTrialMenuController>().PokemonNameInput.gameObject.SetActive(false);
            QC.DeActivate();
            break;

        case MenuState.Disable:
            TitleText.SetActive(false);
            StartUpMenu.SetActive(false);
            LogInMenu.SetActive(false);
            SignUpMenu.SetActive(false);
            GameMenu.SetActive(false);
            TimeTrialMenu.SetActive(false);
            QC.DeActivate();
            break;
        }
        this.gameObject.SetActive(true);
    }