Exemple #1
0
        public override void Tick()
        {
            if (!Blackboard.ClientConnector.HasConnected)
            {
                return;
            }

            var state     = new WaitForGameState(Manager, Owner);
            var nextState = new QuerySessionStatusState(state, Manager, Owner);

            ScreenManager.LobbyStatus.ShowWaitForGameText();
            Owner.SetState(nextState);
        }
Exemple #2
0
        public override void Tick()
        {
            switch (Blackboard.SessionStatus)
            {
            case Status.LOBBY:
                var state     = new WaitForGameState(Manager, Owner);
                var nextState = new QuerySessionStatusState(state, Manager, Owner);
                Owner.SetState(nextState);
                break;

            case Status.RUNNING:
                ScreenManager.StartGameButton.enabled = IsValidName();
                ScreenManager.LobbyStatus.ShowGameReadyText();
                break;

            case Status.STOPPING:
            case Status.STOPPED:
                CancelSession();
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }