public void pauseTheGame() { pauseEnable = !pauseEnable; if (pauseEnable == true) { if (timerBG) { timerBG.renderer.enabled = false; } if (timerGUIText) { timerGUIText.guiText.enabled = false; } mainMenuScript.moveMainMenu(true); levelSelectionScript.movelevelSelection(true); refreshGameScript.moveRefresh(true); exitGameScript.moveExit(true); pauseBarScript.pauseBar(true); StartCoroutine("delay"); } else { if (timerBG) { timerBG.renderer.enabled = true; } if (timerGUIText) { timerGUIText.guiText.enabled = true; } Time.timeScale = 1; mainMenuScript.moveMainMenu(false); levelSelectionScript.movelevelSelection(false); refreshGameScript.moveRefresh(false); exitGameScript.moveExit(false); pauseBarScript.pauseBar(false); } }
public void pauseTheGame() { pauseEnable = !pauseEnable; if (pauseEnable == true) { mainMenuScript.homeButton(true); audioMuteScript.audioMuteButton(true); exitGameScript.exitButton(true); pauseBarScript.pauseBar(true); StartCoroutine("delay"); } else if (pauseEnable == false) { Time.timeScale = 1; mainMenuScript.homeButton(false); audioMuteScript.audioMuteButton(false); exitGameScript.exitButton(false); pauseBarScript.pauseBar(false); } }