Пример #1
0
 static GameController()
 {
     player1 = new GamePadController(PlayerIndex.One);
     player2 = new GamePadController(PlayerIndex.Two);
     player3 = new GamePadController(PlayerIndex.Three);
     player4 = new GamePadController(PlayerIndex.Four);
 }
Пример #2
0
        void AddNetworkGamer(NetworkGamer gamer)
        {
            if (!m_players.ContainsKey(gamer)) {
                if (gamer.IsLocal) {
                    m_player = new Player(new PlayerSprite(m_content.PlayerSprite), (LocalNetworkGamer)gamer);
                    m_controller = GameController.player1;
                    gamer.Tag = m_player;
                }
                else
                    gamer.Tag = new Player(new PlayerSprite(m_content.PlayerSprite));

                m_players.Add(gamer, gamer.Tag as Player);
            }
        }