Beispiel #1
0
 public void OnResume()
 {
     if (!SceneExtension.TrySwitchToScene(lastSceneBuildIndex))
     {
         return;
     }
     _inputController.OnCancelEvent -= OnCancelEventCalled;
     _controller.TurnMenuPageOff(_controller.GetCurrentMenuPageType());
     _isPaused = false;
 }
Beispiel #2
0
        public static void ReturnToMenu(MenuPageType pageToLoad)
        {
            //Debug.Log("[GM]: ReturnToMenu");
            SceneExtension.TrySwitchToScene(SceneExtension.MenuUiSceneName);
            SceneExtension.UnloadAllScenesExcept(SceneExtension.MenuUiSceneName);
            FindObjectOfType <MenuManager>().Reset();
            var controller = FindObjectOfType <MenuPageController>();

            controller.TurnMenuPageOff(controller.GetCurrentMenuPageType(), pageToLoad);
        }
Beispiel #3
0
 public void OnPause()
 {
     lastSceneBuildIndex = SceneExtension.GetCurrentSceneBuildIndex();
     if (!SceneExtension.TrySwitchToScene(SceneExtension.MenuUiSceneName))
     {
         return;
     }
     _inputController.OnCancelEvent += OnCancelEventCalled;
     BackToPreviousPage();
     _isPaused = true;
 }