Пример #1
0
 void OpenPlayerSelection()
 {
     MainMenuParent.SetActive(false);
     PlayerSelectionWithCamera.SetActive(true);
     PlayerSelectionmenuParent.SetActive(true);
     TotalCoinsParent.SetActive(true);
     SoundController.Static.playSoundFromName("Click");
     currentScreen = MenuScreens.playerSelectionMenu;
 }
Пример #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
    public void OnButtonClick(string ButtonName)
    {
        switch (ButtonName)
        {
        case "Select":
            SoundController.Static.playSoundFromName("Click");
            selectedButton.SetActive(true);
            // save selected player index
            PlayerPrefs.SetInt("SelectedPlayer", PlayerIndex);
            break;

        case "Previous":
            SoundController.Static.playSoundFromName("Click");
            showPreviousPlayer();
            break;

        case "Next":
            SoundController.Static.playSoundFromName("Click");
            showNextPlayer();
            break;

        case "Buy":
            SoundController.Static.playSoundFromName("Click");
            PurchasePlayer();
            MainMenu.currentScreen = MainMenu.MenuScreens.UnSufficentCoinsMenu;
            break;

        case "Back":
            SoundController.Static.playSoundFromName("Click");
            PlayerSelectionWithCamera.SetActive(false);
            PlayerSelectionMenu.SetActive(false);
            MainMenuParent.SetActive(true);
            pc.InstantiateSelectedPlayer();
            MainMenu.currentScreen = MainMenu.MenuScreens.mainmenu;
            break;
        }
    }