Example #1
0
        public override void HandleInput(GameTime gameTime, GameState.InputState input)
        {
            foreach (LocalNetworkGamer gamer in _networkSession.LocalGamers) {
                ReadIncomingPackets(gamer);
                PlayerIndex playerIndex = gamer.SignedInGamer.PlayerIndex;

                _currentKeyBoard = Keyboard.GetState(playerIndex);

                PlayerIndex unwantedOutput;

                if (input.IsMenuSelected(playerIndex, out unwantedOutput))
                    handleMenuSelected(gamer);
                else if (input.IsMenuCancel(playerIndex, out unwantedOutput))
                    handleMenuCancel(gamer);
                else if(isSelectingTeam1())
                    handleChangeToTeam(gamer, 1);
                else if(isSelectingTeam2())
                    handleChangeToTeam(gamer, 2);

                _lastKeyBoard = _currentKeyBoard;
            }
        }