protected override void Execute(IOnlineConnection Sender)
        {
            FightingZone NewGame = new FightingZone(Owner.MapPath, Owner.UseTeams, OnlineServer, CreatedGroup);

            GameRules Rules = new BattleGameRules(Owner, NewGame);

            NewGame.Rules = Rules;

            CreatedGroup.SetGame(NewGame);

            for (int P = 0; P < CreatedGroup.Room.ListOnlinePlayer.Count; P++)
            {
                IOnlineConnection ActiveOnlinePlayer = CreatedGroup.Room.ListOnlinePlayer[P];
                Player            ActivePlayer       = Owner.ListRoomPlayer[P];
                ActivePlayer.OnlineClient = ActiveOnlinePlayer;

                NewGame.AddLocalCharacter(ActivePlayer);

                //Add Game Specific scripts
                Dictionary <string, OnlineScript> DicNewScript = OnlineHelper.GetTripleThunderScriptsServer(CreatedGroup, ActivePlayer);
                ActiveOnlinePlayer.AddOrReplaceScripts(DicNewScript);
            }

            for (int P = 0; P < CreatedGroup.Room.ListOnlinePlayer.Count; P++)
            {
                IOnlineConnection ActiveOnlinePlayer = CreatedGroup.Room.ListOnlinePlayer[P];
                ActiveOnlinePlayer.Send(new CreateGameScriptServer());
            }
        }
示例#2
0
        protected override void Execute(IOnlineConnection Host)
        {
            FightingZone NewGame = new FightingZone(Owner);
            GameRules    Rules   = new BattleGameRules(Room, NewGame);

            NewGame.Rules = Rules;

            NewGame.ListGameScreen = ListGameScreen;
            NewGame.PushScreen(new LoadingScreen(NewGame, Owner));

            Dictionary <string, OnlineScript> DicNewScript = OnlineHelper.GetTripleThunderScriptsClient(Owner);

            Host.AddOrReplaceScripts(DicNewScript);
        }
        protected override void Execute(IOnlineConnection Host)
        {
            FightingZone NewGame = new FightingZone(Owner);
            GameRules    Rules   = new BattleGameRules(Room, NewGame);

            NewGame.Rules = Rules;

            NewGame.ListGameScreen = ListGameScreen;
            NewGame.PushScreen(new LoadingScreen(NewGame, Owner));

            Dictionary <string, OnlineScript> DicNewScript = new Dictionary <string, OnlineScript>();

            DicNewScript.Add(SendPlayerUpdateScriptClient.ScriptName, new SendPlayerUpdateScriptClient(Owner));
            DicNewScript.Add(SendPlayerRespawnScriptClient.ScriptName, new SendPlayerRespawnScriptClient(Owner));
            DicNewScript.Add(SendPlayerDamageScriptClient.ScriptName, new SendPlayerDamageScriptClient(Owner));
            DicNewScript.Add(ShootBulletScriptClient.ScriptName, new ShootBulletScriptClient(Owner));
            DicNewScript.Add(ReceiveGameDataScriptClient.ScriptName, new ReceiveGameDataScriptClient(Owner));
            DicNewScript.Add(GoToNextMapScriptClient.ScriptName, new GoToNextMapScriptClient(Owner));
            DicNewScript.Add(GameEndedScriptClient.ScriptName, new GameEndedScriptClient(Owner));

            Host.AddOrReplaceScripts(DicNewScript);
        }