public void OnShowingMainMenu() { state = MenuSystemState.MainMenu; for (int i = 0; i < Human.all.Count; i++) { Human.all[i].Reset(); } }
public void FadeOutActive() { state = MenuSystemState.Inactive; if (activeMenu != null) { activeMenu.FadeOutForward(); } }
public void ExitMenus() { if (activeMenu != null) { activeMenu.Transition(1f, 1f); activeMenu.Transition(1f, 0f); } state = MenuSystemState.Inactive; activeMenu = null; ExitMenuInputMode(); SubtitleManager.instance.Show(); }
private void OnEnable() { state = MenuSystemState.Inactive; instance = this; inputModule = UnityEngine.Object.FindObjectOfType <InControlInputModule>(); eventSystem = UnityEngine.Object.FindObjectOfType <EventSystem>(); MenuTransition[] componentsInChildren = GetComponentsInChildren <MenuTransition>(); MenuTransition[] array = componentsInChildren; foreach (MenuTransition menuTransition in array) { menuTransition.gameObject.SetActive(value: false); } }
public void ShowPauseMenu() { state = MenuSystemState.PauseMenu; MenuTransition to = (Game.instance.currentLevelNumber != Game.instance.levelCount) ? ((MenuTransition)GetMenu <PauseMenu>()) : ((MenuTransition)GetMenu <CreditsMenu>()); if (!NetGame.isLocal) { to = GetMenu <MultiplayerPauseMenu>(); } FadeInForward(to); EnterMenuInputMode(); SubtitleManager.instance.Hide(); }
public void ShowMenu <T>(bool hideOldMenu = false) where T : MenuTransition { state = MenuSystemState.MainMenu; if (activeMenu == null) { T menu = GetMenu <T>(); FadeInForward(menu); } else if (hideOldMenu) { activeMenu.TransitionForward <T>(0f); } else { activeMenu.TransitionForward <T>(); } EnterMenuInputMode(); SubtitleManager.instance.Hide(); }