void ShowMenu(int windowID) { GameObject PointCounter = GameObject.Find("Points"); PointCounter Points = PointCounter.GetComponent <PointCounter> (); GUI.Label(new Rect(20, Screen.height / 8, Screen.width - 40, (Screen.height / 2) - 60), loseText + (Points.point) + loseText2); if (GUI.Button(new Rect(20, (Screen.height / 4), (Screen.width / 2) - 30, (Screen.height / 2) - 20), "Main Menu")) { GlobalVariables.pause(); showLoseMenu = false; LoadLevels.loadMenu("bubble_menu"); Time.timeScale = 1; GlobalVariables.isPaused = false; } if (GUI.Button(new Rect((Screen.width / 2), (Screen.height / 4), (Screen.width / 2) - 20, (Screen.height / 2) - 20), "Try Again")) { //LoadLevels.loadMenu ("OceanGame"); //GlobalVariables.pause(); //Application.LoadLevel(Application.loadedLevel); //Time.timeScale = 1; //GlobalVariables.isPaused = false; SceneManager.LoadScene(SceneManager.GetActiveScene().name); Time.timeScale = 1; GlobalVariables.isPaused = false; } }
void ShowMenu(int windowID) { if (GUI.Button(new Rect(20, (Screen.height / 4), (Screen.width / 2) - 30, (Screen.height / 2) - 20), "Quit")) { GlobalVariables.isPaused = false; GlobalVariables.resetDifficulty(); LoadLevels.loadMenu("bubble_menu"); } if (GUI.Button(new Rect((Screen.width / 2), (Screen.height / 4), (Screen.width / 2) - 20, (Screen.height / 2) - 20), "Resume")) { GlobalVariables.isPaused = false; showPauseMenu = false; } }