// Update is called once per frame void OnGUI() { if (GUI.Button(new Rect(30, 30, 140, 50), "Change Angle")) { action.ChangeCamera(); } GUI.Label(new Rect(Screen.width / 2 - 100, 10, 200, 50), "Priests & Demons", headerStyle); if (status == 1) { GUI.Label(new Rect(Screen.width / 2 - 45, Screen.height / 2 - 90, 100, 50), "Gameover!", headerStyle); if (GUI.Button(new Rect(Screen.width / 2 - 65, Screen.height / 2, 140, 70), "Restart", buttonStyle)) { status = 0; action.restart(); } } else if (status == 2) { GUI.Label(new Rect(Screen.width / 2 - 50, Screen.height / 2 - 90, 100, 50), "Win!", headerStyle); if (GUI.Button(new Rect(Screen.width / 2 - 70, Screen.height / 2, 140, 70), "Restart", buttonStyle)) { status = 0; action.restart(); } } }