public void OnGameExitRequest() { CancelInvoke("HideContainer"); PauseHelper.PauseGame(); exitButtonsContainer.active = true; fadingBackground.FadeInto(Color.black, 10); }
private void OnMenuHidden() { PauseHelper.ResumeGame(); menuState = MenuState.HIDDEN; pauseButton.TogglePauseButton(true); DispatchMessage("OnGameResumed", null); }
private void OnStartTutorial() { PauseHelper.PauseGame(); output.enabled = true; isInTutorialMode = true; }
public void RemovePauseHelper(PauseHelper pauseHelper) { if (pauseHelper == lastPauseHelper) { if (pauseHelper == firstPauseHelper) { pauseHelper.Next = null; pauseHelper.Previous = null; lastPauseHelper = null; firstPauseHelper = null; } else { pauseHelper.Previous.Next = null; lastPauseHelper = pauseHelper.Previous; pauseHelper.Previous = null; } } else { if (pauseHelper == firstPauseHelper) { pauseHelper.Next.Previous = null; firstPauseHelper = pauseHelper.Next; pauseHelper.Next = null; } else { pauseHelper.Next.Previous = pauseHelper.Previous; pauseHelper.Previous.Next = pauseHelper.Next; pauseHelper.Next = null; pauseHelper.Previous = null; } } }
void ActivatePauseOrResume() { //pause menu if (isPaused) { pauseMenu.MovePanelPause(); } else { pauseMenu.MovePanelResume(); } //pause the pausables if (firstPauseHelper != null) { PauseHelper pauseHelper = firstPauseHelper; while (pauseHelper.Next != null) { pauseHelper.PauseOrResume(isPaused); pauseHelper = pauseHelper.Next; } pauseHelper.PauseOrResume(isPaused); } }
private void ContinueGame() { output.enabled = false; PauseHelper.ResumeGame(); if (animationForCurrentRoomType) { animationForCurrentRoomType.Hide(); animationForCurrentRoomType.Stop(); } }
public static void LoadSceneQuickly(Scene scene) { PauseHelper.ResumeGame(); Time.timeScale = 1f; Loader.IS_USING_LOADER = false; Loader.HAS_DONE_FULL_RELOAD = false; loadingScene = scene; Application.LoadLevel(scene.ToString()); }
public static void LoadScene(Scene scene) { PauseHelper.ResumeGame(); Time.timeScale = 1f; Loader.IS_USING_LOADER = true; Loader.HAS_USED_LOADER = true; Loader.HAS_DONE_FULL_RELOAD = true; loadingScene = scene; Application.LoadLevel(Scene.Empty.ToString()); Application.LoadLevelAdditive(Scene.Loading.ToString()); }
public static void LoadSceneQuickly(Scene scene) { PlayerInputHelper.ResetInputHelper(); PauseHelper.ResumeGame(); Time.timeScale = 1f; Loader.IS_USING_LOADER = false; Loader.HAS_DONE_FULL_RELOAD = false; loadingScene = scene; SceneManager.LoadScene(scene.ToString()); }
public static void LoadSceneAdditive(Scene scene) { PlayerInputHelper.ResetInputHelper(); if (GameObject.Find("CameraContainer")) { GameObject.Find("CameraContainer").SetActive(false); GameObject.Find("UICameraContainer").SetActive(false); } PauseHelper.ResumeGame(); Time.timeScale = 1f; Logger.Log("loading.. " + scene.ToString()); SceneManager.LoadScene(scene.ToString(), LoadSceneMode.Additive); }
public static void LoadScene(Scene scene) { PlayerInputHelper.ResetInputHelper(); PauseHelper.ResumeGame(); Time.timeScale = 1f; Loader.IS_USING_LOADER = true; Loader.HAS_USED_LOADER = true; Loader.HAS_DONE_FULL_RELOAD = true; loadingScene = scene; SceneManager.LoadScene(Scene.Empty.ToString(), LoadSceneMode.Single); SceneManager.LoadScene(Scene.Loading.ToString(), LoadSceneMode.Additive); }
public void OnPauseButtonClicked() { switch (menuState) { case MenuState.HIDDEN: menuState = MenuState.SHOWING; PauseHelper.PauseGame(); ShowMenu(); DispatchMessage("OnGamePaused", null); break; case MenuState.SHOWN: menuState = MenuState.HIDING; HideMenu(); break; } }
public static void ReloadLevelWithoutLoadingScene(bool isUsingLoader = true) { PlayerInputHelper.ResetInputHelper(); PauseHelper.ResumeGame(); Time.timeScale = 1f; string sceneToLoad = loadingScene.ToString(); if (!Loader.HAS_USED_LOADER) { sceneToLoad = Application.loadedLevelName; } Loader.IS_USING_LOADER = isUsingLoader; HAS_DONE_FULL_RELOAD = false; SceneManager.LoadScene(sceneToLoad, LoadSceneMode.Single); }
public void AddPauseHelper(PauseHelper pauseHelper) { if (lastPauseHelper != null /*&& firstPauseHelper != null*/) { lastPauseHelper.Next = pauseHelper; pauseHelper.Previous = lastPauseHelper; while (lastPauseHelper.Next != null) { lastPauseHelper = lastPauseHelper.Next; } } else //lastPauseHelper == null && firstPauseHelper == null { lastPauseHelper = pauseHelper; firstPauseHelper = pauseHelper; while (lastPauseHelper.Next != null) { lastPauseHelper = lastPauseHelper.Next; } } }
public void OnNoButtonPressed() { PauseHelper.ResumeGame(); Invoke("HideContainer", .1f); fadingBackground.FadeInto(originalColor, 10); }