Example #1
0
 public void OnShowingMainMenu()
 {
     state = MenuSystemState.MainMenu;
     for (int i = 0; i < Human.all.Count; i++)
     {
         Human.all[i].Reset();
     }
 }
Example #2
0
 public void FadeOutActive()
 {
     state = MenuSystemState.Inactive;
     if (activeMenu != null)
     {
         activeMenu.FadeOutForward();
     }
 }
Example #3
0
 public void ExitMenus()
 {
     if (activeMenu != null)
     {
         activeMenu.Transition(1f, 1f);
         activeMenu.Transition(1f, 0f);
     }
     state      = MenuSystemState.Inactive;
     activeMenu = null;
     ExitMenuInputMode();
     SubtitleManager.instance.Show();
 }
Example #4
0
 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);
     }
 }
Example #5
0
    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();
    }
Example #6
0
 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();
 }