Example #1
0
    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);
    }
Example #2
0
    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);
    }