void OnGUI() { if ((Input.touchCount > 0 || Input.anyKeyDown) && !isRunning) { GameManager.TriggerGameStart(); } inScore.text = "Score : " + Score; GUI.Label(new Rect(0.5f, -0.5f, 10, 10), Score.ToString()); if (!paused && isRunning) { if (GUI.Button(new Rect(Screen.width - (Screen.width * 11 / 100f), (Screen.height * 1) / 100, Screen.width * 10 / 100f, Screen.width * 10 / 100f), "II")) { Time.timeScale = 0; InGame.SetActive(false); Paused.SetActive(true); paused = true; } } else if (isRunning) { if (GUI.Button(new Rect(Screen.width / 2 - (Screen.width * 25 / 100f) / 2, Screen.height / 2 + (Screen.height * 10 / 100f) / 2, (Screen.width * 25 / 100f), (Screen.height * 10 / 100f)), "Resume")) { Time.timeScale = 1; InGame.SetActive(true); Paused.SetActive(false); paused = false; } } }