private void OnCancel() { switch (serverState) { case SERVER_STATE.HOST: { networkManager.StopHost(); break; } case SERVER_STATE.CLIENT: { networkManager.StopHost(); break; } case SERVER_STATE.SERVER: { networkManager.StopServer(); break; } default: { DebugLog.Console("Something went wrong. Cancel button clicked with no server state."); break; } } ShowMainServerButtons(); serverState = SERVER_STATE.NONE; }
private void StartHost() { networkManager.StartHost(); DebugLog.Console("Starting Host"); cancelButton.Title = "Stop Host"; HideMainServerButtons(); serverState = SERVER_STATE.HOST; }
private void StartServer() { networkManager.StartServer(); DebugLog.Console("Starting Server"); cancelButton.Title = "Stop Server"; HideMainServerButtons(); serverState = SERVER_STATE.SERVER; }
private void StartClient() { networkManager.StartClient(); DebugLog.Console("Starting Client"); cancelButton.Title = "Stop Client"; HideMainServerButtons(); serverState = SERVER_STATE.CLIENT; }