void OpenPlayerSelection() { MainMenuParent.SetActive(false); PlayerSelectionWithCamera.SetActive(true); PlayerSelectionmenuParent.SetActive(true); TotalCoinsParent.SetActive(true); SoundController.Static.playSoundFromName("Click"); currentScreen = MenuScreens.playerSelectionMenu; }
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); }
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; } }