public static void LoadLevel(string sceneRef) { // Starting the fade out animation animator.SetTrigger(FadeOut); // Create a new task starting the loading of the larger scene loadLevel = new Task(LoadAsynchronously(sceneRef), false); // Pause the game PauseHandler.Pause(PauseId); }
public void Update() { // Checks whether the conversation if (!DialogueManager.IsSpeaking() && hasSpoken) { // Opens the upgrade menu upgradeMenu.SetActive(true); // Pauses the game PauseHandler.Pause("skillTree"); // Change the beginning of the speech dialogue.SetStartingContents(reuseDialogue.StartSpeech()); hasSpoken = false; } }
public void ChangePause() { isPaused = !isPaused; // Turn the pause menu on or off depending on if the // game is paused or not pauseMenuUi.SetActive(isPaused); // Change the time scale also accordingly if (isPaused) { PauseHandler.Pause(pauseId); } else { PauseHandler.RemovePause(pauseId); } }
public void Pause() { Time.timeScale = 0f; PauseHandler.Pause(); }