public void LeaveRoom() { SocketIOComp.Emit("SERVER:LEAVE"); //GlobalGameState.Disconnect (); GlobalGameState.HandleLeaveGame(); GlobalGameState.HideAllUI(); GlobalGameState.LoginUI.Show(); // set spectate cam on! GlobalGameState.SpectateCam.gameObject.SetActive(false); }
public void LeaveGame(bool IsByPlayerWill) { SocketIOComp.Emit("SERVER:LEAVE_GAME"); //GlobalGameState.Disconnect (); GlobalGameState.HandleLeaveGame(); GlobalGameState.HideAllUI(); if (IsByPlayerWill) { GlobalGameState.LobbyUI.ResetLobbyState(); } GlobalGameState.LobbyUI.Show(); GlobalGameState.GameUI.ShowWithOption(GameUIController.GameUIState.Lobby); // set spectate cam on! GlobalGameState.SpectateCam.gameObject.SetActive(true); }