public GDGameScreen_MPClient(MainGame game, GraphicsDeviceManager gdm, LevelBlueprint bp, GameSpeedModes speed, int music, GDMultiplayerClient server)
            : base(game, gdm, bp, FractionDifficulty.DIFF_3, false, true, false)
        {
            musicIdx      = music;
            GameSpeedMode = speed;
            _server       = server;
            CanPause      = false;

            _server.Screen = this;

            if (server.SessionUserID == 1)
            {
                _localPlayerFraction = GetFractionByID(2);
            }
            else if (server.SessionUserID == 2)
            {
                _localPlayerFraction = GetFractionByID(3);
            }
            else if (server.SessionUserID == 3)
            {
                _localPlayerFraction = GetFractionByID(4);
            }
            else if (server.SessionUserID == 4)
            {
                _localPlayerFraction = GetFractionByID(5);
            }
            else if (server.SessionUserID == 5)
            {
                _localPlayerFraction = GetFractionByID(6);
            }
            else
            {
                SAMLog.Error("GDGSMPC", "Client with SSID: " + server.SessionUserID);
            }

            foreach (var c in GetEntities <Cannon>())
            {
                c.ForceUpdateController();
            }

            GameHUD = new GDMultiplayerGameHUD(this, server);

#if DEBUG
            _server.AddDebugLine(this);
#endif
        }
Beispiel #2
0
        public GDGameScreen_MPServer(MainGame game, GraphicsDeviceManager gdm, LevelBlueprint bp, GameSpeedModes speed, int music, GDMultiplayerServer server)
            : base(game, gdm, bp, FractionDifficulty.DIFF_3, false, true, false)
        {
            musicIdx      = music;
            GameSpeedMode = speed;
            _server       = server;
            CanPause      = false;

            _server.Screen = this;

            _localPlayerFraction = GetFractionByID(1);

            foreach (var c in GetEntities <Cannon>())
            {
                c.ForceUpdateController();
            }

            GameHUD = new GDMultiplayerGameHUD(this, server);

#if DEBUG
            _server.AddDebugLine(this);
#endif
        }