コード例 #1
0
ファイル: Stage.cs プロジェクト: bigsassy/Maze-Game
        public Stage(Game game, StageContentManager content, NetworkDisplayGUI networkGUI)
            : base(game)
        {
            m_batch = new SpriteBatch(game.GraphicsDevice);
            m_content = content;
            m_players = new Dictionary<NetworkGamer, Player>();
            Global.networkSession.GamerJoined += networkSession_GamerJoined;
            Global.networkSession.GamerLeft += networkSession_GamerLeft;
            m_networkGUI = networkGUI;

            rand = new Random(50);  // Let's make it always the same for now
        }
コード例 #2
0
ファイル: Game1.cs プロジェクト: bigsassy/Maze-Game
        private void StartGame()
        {
            StartMultiplayer();

            NetworkDisplayGUI networkGUI = new NetworkDisplayGUI(this, m_content);
            Stage stage = new Stage(this, m_content, networkGUI);
            Components.Add(stage);
            Components.Add(networkGUI);
        }