public void ChangeMenu(MenuState onState, bool CloseLastHard = false) { switch (onState) { case MenuState.MapSelect: if (MainData.GetInstance().GetMainPlayer() == null) { ChangeMenu(MenuState.PlayerSelect, true); InfoMessage.ShowMessage("No current player"); return; } MapSelectMenu.OpenMenu(); BackOnClickPlane.OpenMenu(); break; case MenuState.PlayerSelect: PlayerSelectMenu.OpenMenu(); BackOnClickPlane.OpenMenu(); break; case MenuState.Settings: SettingsMenu.OpenMenu(); break; } HideMenu(CurrentState, CloseLastHard); CurrentState = onState; }
public void PressSecretButton() { if (!testButton.gameObject.activeSelf) { if (++TestInt > 10) { InfoMessage.ShowMessage("Testing mode activated", 1.5f); testButton.gameObject.SetActive(true); MainData.isTestingMode = true; } } }