Exemplo n.º 1
0
 //for disable all menu screens
 void DeActive()
 {
     MainMenuParent.SetActive(false);
     LoadingMenuParent.SetActive(false);
     PlayerSelectionParent.SetActive(false);
     ControlselectionMenuParent.SetActive(false);
     CredtsMenuParent.SetActive(false);
     ByPopupMenuParent.SetActive(false);
     UnSufficentCoinsMenuParent.SetActive(false);
     LevelSelectionMenuParent.SetActive(false);
     StoreMenuParent.SetActive(false);
     InnAppMenuParent.SetActive(false);
     UnsufficentCoinsForPlayerselectionMenu.SetActive(false);
 }
Exemplo n.º 2
0
 void DeActive()
 {
     MainMenuParent.SetActive(false);
     LoadingMenuParent.SetActive(false);
     PlayerSelectionmenuParent.SetActive(false);
     PlayerSelectionWithCamera.SetActive(false);
     CreditsMenuParent.SetActive(false);
     ByPopupMenuParent.SetActive(false);
     InSufficentCoinsMenuParent.SetActive(false);
     LevelSelectionMenuParent.SetActive(false);
     UpgradesMenuParent.SetActive(false);
     InnAppMenuParent.SetActive(false);
     InsufficentCoinsForPlayerselectionMenu.SetActive(false);
     MissionsMenuParent.SetActive(false);
 }
Exemplo n.º 3
0
    void Update()
    {
        if (GameController.Static.currentGameState == GameController.GameState.gameplay)
        {
            return;
        }

        switch (currentScreen)
        {
        case MenuScreens.mainmenu:
            TotalCoinsParent.SetActive(false);

            if (Input.GetKeyDown(KeyCode.Escape))
            {
                //DeActive();
                ExitParent.SetActive(true);
            }
            break;

        case MenuScreens.playerSelectionMenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();
                //FindObjectOfType<PlayerController>().InstantiateSelectedPlayer(); why doesnt this work after purchasing a player??? fuuuck
                MainMenuParent.SetActive(true);
            }
            break;

        case MenuScreens.ControlselectionMenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();
                LevelSelectionMenuParent.SetActive(true);
                currentScreen = MenuScreens.LevelSelectionMenu;
                //TotalCoinsParent.SetActive(true);
            }
            break;

        case MenuScreens.CredtsMenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();
                MainMenuParent.SetActive(true);
            }
            break;

        case MenuScreens.ByPopupMenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();
                PlayerSelectionmenuParent.SetActive(true);
            }
            break;

        case MenuScreens.UnSufficentCoinsMenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();
                MainMenuParent.SetActive(true);
            }
            break;

        case MenuScreens.LevelSelectionMenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();
                PlayerSelectionmenuParent.SetActive(true);
                currentScreen = MenuScreens.playerSelectionMenu;
            }
            break;

        case MenuScreens.StoreMenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();
                MainMenuParent.SetActive(true);
            }
            break;

        case MenuScreens.InnAppmenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();
                MainMenuParent.SetActive(true);
            }
            break;

        case MenuScreens.Missions:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();
                MainMenuParent.SetActive(true);
            }
            break;
        }
    }
Exemplo n.º 4
0
    void Update()
    {
        if (GameController.Static.currentGameState == GameController.GameState.gameplay)
        {
            return;
        }
        Debug.Log("HUEHUEHUE");
        switch (currentScreen)
        {
        case MenuScreens.mainmenu:
            Debug.Log("main menu enumerator");
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();
            }
            break;

        case MenuScreens.playerSelectionMenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();
                MainMenuParent.SetActive(true);
            }
            break;

        case MenuScreens.ControlselectionMenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();
                LevelSelectionMenuParent.SetActive(true);
                currentScreen = MenuScreens.LevelSelectionMenu;
                TotalCoinsParent.SetActive(true);
            }
            break;

        case MenuScreens.CredtsMenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();
                MainMenuParent.SetActive(true);
            }
            break;

        case MenuScreens.ByPopupMenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();
                PlayerSelectionParent.SetActive(true);
            }
            break;

        case MenuScreens.UnSufficentCoinsMenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();
                MainMenuParent.SetActive(true);
            }
            break;

        case MenuScreens.LevelSelectionMenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();
                PlayerSelectionParent.SetActive(true);
                currentScreen = MenuScreens.playerSelectionMenu;
            }
            break;

        case MenuScreens.StoreMenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();
                MainMenuParent.SetActive(true);
            }
            break;

        case MenuScreens.InnAppmenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();
                MainMenuParent.SetActive(true);
            }
            break;

        case MenuScreens.Missions:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();
                MainMenuParent.SetActive(true);
            }
            break;
        }
    }