void OnGUI() { buttonStyle.fontSize = Screen.height / 35; left = Screen.width / 16.0f; top = Screen.height / 6.0f; width = Screen.width / 4.0f; height = Screen.height / 4.0f; answerCount = 0; if (isAskingQuestion) { foreach (string answer in answers) { if (answer != null) { if (GUI.Button(new Rect(left, top, width, height), answer, answerStyle)) { if (string.Equals(answer, correctAnswer)) { scorekeeper.addPoint(); } else { scorekeeper.subtractPoint(); } isAskingQuestion = false; GUIQuestions q = this.GetComponent <GUIQuestions>(); q.turnOffQuestion(); } } top += heightIncrement; answerCount++; if (answerCount == answers.Length / 2) { left = Screen.width - 5.0f * Screen.width / 16.0f; top = Screen.height / 6.0f; } } } if (GUI.Button(new Rect(Screen.width - width / 3 - 10, Screen.height - width / 4 - 10, width / 3, height / 3), "back", buttonStyle)) { Application.LoadLevel("settings"); } }