//void DoPlayStart() //{ // GameController.Static.currentGameState = GameController.GameState.gameplay; // MainMenuParent.SetActive(false); // InGameUi.SetActive(true); // CameraFade.current.FadeIn(null, 1f, 0f); //} public void OnButtonClick(string ButtonName) { switch (ButtonName) { case "Play": // start intro animation, enable ingameUI CameraFade.current.FadeOut(CameraFade.current.FadeInTest, 0.3f, 0f); GameController.Static.OnGameStart(); SoundController.Static.playSoundFromName("Click"); MainMenuParent.SetActive(false); InGameUi.SetActive(true); TotalCoinsParent.SetActive(false); break; case "PlayerSelect": CameraFade.current.FadeOut(CameraFade.current.FadeInTest, 0.3f, 0f); Invoke("OpenPlayerSelection", 0.2f); break; case "Credits": SoundController.Static.playSoundFromName("Click"); MainMenuParent.SetActive(false); CreditsMenuParent.SetActive(true); TotalCoinsParent.SetActive(false); currentScreen = MenuScreens.CredtsMenu; break; case "Exit": SoundController.Static.playSoundFromName("Click"); ExitParent.SetActive(true); MainMenuParent.SetActive(false); TotalCoinsParent.SetActive(false); Application.Quit(); break; case "Store": CameraFade.current.FadeOut(CameraFade.current.FadeInTest, 0.3f, 0f); Invoke("OpenUpgradesMenu", 0.2f); break; case "Missions": //CameraFade.current.FadeOut(CameraFade.current.FadeInTest, 0.3f, 0f); Invoke("OpenMissionsMenu", 0.2f); break; case "Settings": //CameraFade.current.FadeOut(CameraFade.current.FadeInTest, 0.3f, 0f); Invoke("OpenSettingsMenu", 0.2f); break; case "PauseMenu": //CameraFade.current.FadeOut(CameraFade.current.FadeInTest, 0.3f, 0f); SettingsMenuParent.SetActive(true); MainMenuParent.SetActive(false); TotalCoinsParent.SetActive(false); SoundController.Static.playSoundFromName("Click"); currentScreen = MenuScreens.PauseMenu; break; } }