void Start() { _ConnectToServerGUI = new ConnectToServerGUI(); _CreateServerGUI = new CreateServerGUI(); _MenuGUI = new MenuGUI(); //Resetting variables. PlayerVariables.bPlayingAgainstIA = false; _MenuGUI.OnSinglePlayerCallback(delegate { PlayerVariables.bPlayingAgainstIA = true; Application.LoadLevel("SetupAGame"); }); _MenuGUI.OnCreateServerCallback(delegate { status = ClientStatus.Hosting; }); _MenuGUI.OnJoinGameCallback(delegate { status = ClientStatus.Connecting; }); _ConnectToServerGUI.OnBackCallback(delegate { status = ClientStatus.Disconnected; }); _CreateServerGUI.OnBackCallback(delegate { status = ClientStatus.Disconnected; }); status = ClientStatus.Disconnected; }