public void OnGUI() { if (status == CombatStatus.Pending) { return; } string label = status == CombatStatus.Victory ? "Victory!" : "Defeat."; int x = Screen.width / 2 - statusWidth / 2; int y = Screen.height / 2 - statusHeight / 2; GUI.Label(new Rect(x, y, statusWidth, statusHeight), label); if (GUI.Button(new Rect(Screen.width - 200, Screen.height - 50, 200, 50), "Continue")) { ExperienceManager.ModifyExperience(status == CombatStatus.Victory ? victoryExp : defeatExp); if (status == CombatStatus.Victory) { GameObject player = GameObject.FindGameObjectWithTag("ShipBlueprint"); player.GetComponent <PlayerDamage>().ExitCombat(); } status = CombatStatus.Pending; Application.LoadLevel("Star Map"); } }