public void UnPause() { //Set isPaused to false isPaused = false; //Set time.timescale to 1, this will cause animations and physics to continue updating at regular speed Time.timeScale = 1; //call the HidePausePanel function of the ShowPanels script showPanels.HidePausePanel(); }
private void Update() { if (!menu.notInMenu) { if (Input.GetKeyDown(KeyCode.RightArrow) || Input.GetKeyDown(KeyCode.D)) { if (onResume) { onResume = false; } resume.GetComponent <Image>().color = normalColor; goMenu.GetComponent <Image>().color = highlightedColor; butSound.ButtonChangeSound(); } if (Input.GetKeyDown(KeyCode.LeftArrow) || Input.GetKeyDown(KeyCode.A)) { if (!onResume) { onResume = true; } resume.GetComponent <Image>().color = highlightedColor; goMenu.GetComponent <Image>().color = normalColor; butSound.ButtonChangeSound(); } if (Input.GetButtonDown("Submit")) { butSound.OnClickSound(); if (onResume) { pauseScript.UnPause(); showpanels.HidePausePanel(); } else { pauseScript.UnPause(); showpanels.HidePausePanel(); showpanels.ShowMenu(); SceneManager.LoadScene(0); } } } }
public void UnPause() { GameObject.FindGameObjectWithTag("SoundSystem").GetComponent <SoundSystemController> ().VolumeNormal(); //Set isPaused to false isPaused = false; //Set time.timescale to 1, this will cause animations and physics to continue updating at regular speed Time.timeScale = 1; //call the HidePausePanel function of the ShowPanels script showPanels.HidePausePanel(); }
/// <summary> /// Handles un pauses /// </summary> public void UnPauseGame() { isPaused = false; // release music AudioListener.pause = false; Time.timeScale = 1; showPanels.HidePausePanel(); showPanels.ShowGameButtons(); }
public void ReturnToMenu() { showPanels = GetComponent <ShowPanels>(); ui = GetComponent <StartOptions>(); showPanels.HidePausePanel(); showPanels.ShowMenu(); ui.changeScenes = false; ui.inMainMenu = true; SceneManager.LoadScene(0); }
public void UnPause() { GameStateManager.Instance.IsGamePaused = false; showPanels.ShowUiOverlayCanvas(); //Set isPaused to false isPaused = false; //Set time.timescale to 1, this will cause animations and physics to continue updating at regular speed Time.timeScale = 1; //call the HidePausePanel function of the ShowPanels script showPanels.HidePausePanel(); }
public void UnPause() { //i'm making a new adjustment since I moved Pause.cs from UI to Game Manager. ====================================================================================================== showPanels = FindObjectOfType <ShowPanels>(); //Set isPaused to false isPaused = false; //Set time.timescale to 1, this will cause animations and physics to continue updating at regular speed Time.timeScale = 1; //call the HidePausePanel function of the ShowPanels script showPanels.HidePausePanel(); Debug.LogError("unpause is triggered"); }
public void UnPause() { //Set isPaused to false isPaused = false; //Set time.timescale to 1, this will cause animations and physics to continue updating at regular speed Time.timeScale = 1; //call the HidePausePanel function of the ShowPanels script showPanels.HidePausePanel(); if (!SceneManager.GetActiveScene().name.Equals("Menu")) { Cursor.visible = false; } }
/// <summary> /// back to main menu from in game /// </summary> public void BackToMainMenu() { InMainMenu = true; showPanels.HidePausePanel(); showPanels.ShowMenuPanel(); showPanels.ToggleBackground(true); showPanels.HideGameButtons(); music.PlayMenuMusic(); // scene 0 is the main menu (HARDOCODED) SceneManager.LoadScene(0); }
public void UnPause() { isPaused = false; if (playerActive) { Time.timeScale = 1; Game.Loader.loading = true; Game.Active = true; playerActive = false; } showPanels.HidePausePanel(); }
public void UnPause() { if (!startScript.inMainMenu) { //Set isPaused to false isPaused = false; //Set time.timescale to 1, this will cause animations and physics to continue updating at regular speed Time.timeScale = 1; //call the HidePausePanel function of the ShowPanels script showPanels.HidePausePanel(); // Unfreeze the camera cameraController.Unfreeze(); } }
public void UnPause() { //Set isPaused to false isPaused = false; //Set time.timescale to 1, this will cause animations and physics to continue updating at regular speed Time.timeScale = 1; //call the HidePausePanel function of the ShowPanels script showPanels.HidePausePanel(); FirstPersonController fpc = GameObject.FindObjectOfType <FirstPersonController>(); fpc.enabled = true; Cursor.lockState = CursorLockMode.Locked; Cursor.visible = true; }
public void UnPause() { //Set isPaused to false isPaused = false; //Set time.timescale to 1, this will cause animations and physics to continue updating at regular speed Time.timeScale = 1; //call the HidePausePanel function of the ShowPanels script showPanels.HidePausePanel(); if (Application.loadedLevelName == "Main") { GameObject.Find("control").GetComponent <control> ().ShowCanvas(); } if (Application.loadedLevelName == "GameOver") { GameObject.Find("GameOverControl").GetComponent <GameOverQuit> ().ShowCanvas(); } }
// Restarts the game public void UnEndGame() { ScoreScript.money = 0; // Reloads the game scene SceneManager.LoadScene(SceneManager.GetActiveScene().name); //Set isPaused to false isPaused = false; //Set time.timescale to 1, this will cause animations and physics to continue updating at regular speed Time.timeScale = 1; // Removies the end game panels showPanels.HidePausePanel(); showPanels.HideWinGamePanel(); showPanels.HideLoseGamePanel(); }
public void UnPause() { if (!isGameOver) { //Set isPaused to false isPaused = false; //Set time.timescale to 1, this will cause animations and physics to continue updating at regular speed Time.timeScale = 1; //call the HidePausePanel function of the ShowPanels script showPanels.HidePausePanel(); //unpause game music try { audioManager.UnPauseMusic(); } catch { } } }
public void UnPause() { //Set isPaused to false isPaused = false; //Set time.timescale to 1, this will cause animations and physics to continue updating at regular speed Time.timeScale = 1; //call the HidePausePanel function of the ShowPanels script showPanels.HidePausePanel(); Scene currentScene = SceneManager.GetActiveScene(); string sceneName = currentScene.name; if (sceneName == "Title") { Cursor.lockState = CursorLockMode.None; } else { Cursor.lockState = CursorLockMode.Locked; } }
public void UnPause() { GameObject playerFPS = GameObject.FindGameObjectWithTag("PlayerFPS"); GameObject mainCamera = GameObject.FindGameObjectWithTag("MainCamera"); GameObject player = GameObject.FindGameObjectWithTag("Player"); PlayerHealth playerHealth = player.GetComponent <PlayerHealth>(); if (!playerHealth.isPlayerDead()) { playerFPS.GetComponent <MouseLook>().enabled = true; playerFPS.GetComponent <CharacterMotor>().enabled = true; mainCamera.GetComponent <MouseLook>().enabled = true; } hudCanvas.SetActive(true); //Set isPaused to false isPaused = false; //Set time.timescale to 1, this will cause animations and physics to continue updating at regular speed Time.timeScale = 1; //call the HidePausePanel function of the ShowPanels script showPanels.HidePausePanel(); }
public void MainMenu() { // Destroy(this.transform.parent.gameObject); // Destroy(GameObject.Find("EventSystem")); // Destroy(GameObject.Find("UI")); //// GameObject("EventSystem") // showPanels.HidePausePanel (); //// SceneManager.CreateScene (1); // SceneManager.UnloadSceneAsync (1); // SceneManager.LoadScene(0); // Destroy(GameObject.Find("showPanels")); // SceneManager.GetSceneAt (1); // GameObject.Destroy (SceneManager.GetSceneAt (1); // Application.LoadLevel ("scene"); SceneManager.UnloadSceneAsync(startOptions.sceneToStart); showPanels.HidePausePanel(); }
private void HidePausePanelAndEnablePlayerControl() { _showPanels.HidePausePanel(); }
public void UnPause() { isPaused = false; Time.timeScale = 1; showPanels.HidePausePanel(); }
private void HidePausePanelAndEnablePlayerControl() { _startScript.SetPlayerState(true); _showPanels.HidePausePanel(); }