Example #1
0
        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);
        }
Example #2
0
        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;
            }
        }
Example #3
0
        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);
            }
        }
Example #4
0
 public void Pause()
 {
     Time.timeScale = 0f;
     PauseHandler.Pause();
 }