// NOTE: Pause the game and shows Pause Menu public void PauseGame() { lastMenu = null; EventSystem.current.SetSelectedGameObject(PauseMenu.transform.GetChild(0).gameObject); Se.GameState.Pause(); ShowMenu(PauseMenu); LoadingScreenManager.GetInstance().Show(0.5f); audioManager.PlayMusic(AudioManager.Music.Menu); audioManager.PauseAmbient(); }
// NOTE: Returns to game and hide all menus public void ResumeGame() { lastMenu = null; Se.GameState.Resume(); foreach (GameObject menu in Menus) { menu.SetActive(false); } LoadingScreenManager.GetInstance().Show(0.5f); audioManager.PauseMusic(); audioManager.PlayAmbient(); }
public void ExitGame() { LoadingScreenManager.GetInstance().Show(2); Application.Quit(); }