Exemple #1
0
        void Update()
        {
            switch (playerGuiState)
            {
            case PlayerClientGUIState.Login:
                SwitchToLogin();

                if (authComp.loginSucessful)
                {
                    playerGuiState = PlayerClientGUIState.Main;
                    return;
                }
                break;

            case PlayerClientGUIState.Main:
                SwitchToMain();
                CheckGamesList();
                break;

            case PlayerClientGUIState.Game:
                SwitchToGame();
                break;
            }

            if (NetworkManager.singleton.isNetworkActive)
            {
                playerGuiState = PlayerClientGUIState.Game;
            }
            else if (authComp.loginSucessful)
            {
                playerGuiState = PlayerClientGUIState.Main;
            }
        }
Exemple #2
0
        public void HandleJoinGameButton(string UniqueID)
        {
            HandleCancelButton();

            gameComp.SendJoinGameMsg(UniqueID);

            playerGuiState = PlayerClientGUIState.Game;
        }
Exemple #3
0
    void Update()
    {
        switch (playerGuiState)
        {
        case PlayerClientGUIState.Login:
            SwitchToLogin();

            if (authComp.loginSucessful)
            {
                playerGuiState = PlayerClientGUIState.Main;
                return;
            }
            break;

        case PlayerClientGUIState.Main:
            SwitchToMain();
            break;

        case PlayerClientGUIState.Game:
            SwitchToGame();
            break;
        }
    }