Пример #1
0
        public override GameState PerformStateChange()
        {
            GameState State = this;

            switch (RequestedState)
            {
            case GameStateID.Playing:
                bool selectionListFilled = true;
                for (int i = 0; i < noPlayers; ++i)
                {
                    selectionListFilled &= SelectionList[i].Count > 0;
                }
                if (selectionListFilled)
                {
                    State = new PlayingState(Host, Host.Config.IO.Keyboard.Left, Host.Config.IO.Keyboard.Right, SelectionList);
                }
                break;
            }
            RequestedState = GameStateID.Invalid;
            return(State);
        }
Пример #2
0
 public override GameState PerformStateChange()
 {
     GameState State = this;
     switch (RequestedState) {
         case GameStateID.Playing:
             bool selectionListFilled = true;
             for (int i = 0; i < noPlayers; ++i)
                 selectionListFilled &= SelectionList[i].Count > 0;
             if (selectionListFilled) {
                 State = new PlayingState(Host, Host.Config.IO.Keyboard.Left, Host.Config.IO.Keyboard.Right, SelectionList);
             }
             break;
     }
     RequestedState = GameStateID.Invalid;
     return State;
 }