예제 #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);
 }
예제 #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);
 }
예제 #3
0
    void Update()
    {
        //for menu escapes control
        switch (currentScreen)
        {
        // for game close
        case MenuScreens.mainmenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                Application.Quit();                                                 //for game close
            }
            break;

        //for main menu
        case MenuScreens.playerSelectionMenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();                                                 //for disable all screens
                MainMenuParent.SetActive(true);                             //for main menu screen screen active
            }
            break;

        //for main menu
        case MenuScreens.CredtsMenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();                                                 //for disable all screens
                MainMenuParent.SetActive(true);                             //for main menu screen active
            }
            break;

        //for player selection
        case MenuScreens.ByPopupMenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();                                                 //for disable all screens
                PlayerSelectionParent.SetActive(true);                      //for playerselection screen active
                PlayerGroup.SetActive(true);                                //for player active
            }
            break;

        //for main menu
        case MenuScreens.UnSufficentCoinsMenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();                                                 //for disable all screens
                MainMenuParent.SetActive(true);                             //for main menu screen active
            }
            break;

        case MenuScreens.Loadindmenu:
            DeActive();                                     //for disable all screens
            LoadingMenuParent.SetActive(true);              //loading menu screen active

            break;

        //for main menu
        case MenuScreens.StoreMenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();                                                 //for disable all screens
                MainMenuParent.SetActive(true);                             //for main menu screen active
            }
            break;

        //for main menu
        case MenuScreens.InnAppmenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();                                                 //for disable all screens
                MainMenuParent.SetActive(true);                             //for main menu screen  active
            }
            break;
        }
    }