当前位置: 首页>>代码示例>>C#>>正文


C# Remote.FrostbiteConnection类代码示例

本文整理汇总了C#中PRoCon.Core.Remote.FrostbiteConnection的典型用法代码示例。如果您正苦于以下问题:C# FrostbiteConnection类的具体用法?C# FrostbiteConnection怎么用?C# FrostbiteConnection使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


FrostbiteConnection类属于PRoCon.Core.Remote命名空间,在下文中一共展示了FrostbiteConnection类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: MoHClient

        public MoHClient(FrostbiteConnection connection) : base(connection) {
            ResponseDelegates.Add("vars.clanTeams", DispatchVarsClanTeamsResponse);
            ResponseDelegates.Add("vars.noCrosshairs", DispatchVarsNoCrosshairsResponse);
            ResponseDelegates.Add("vars.realisticHealth", DispatchVarsRealisticHealthResponse);
            ResponseDelegates.Add("vars.noUnlocks", DispatchVarsNoUnlocksResponse);
            ResponseDelegates.Add("vars.skillLimit", DispatchVarsSkillLimitResponse);
            ResponseDelegates.Add("vars.noAmmoPickups", DispatchVarsNoAmmoPickupsResponse);
            ResponseDelegates.Add("vars.tdmScoreCounterMaxScore", DispatchVarsTdmScoreCounterMaxScoreResponse);

            // Preround vars
            ResponseDelegates.Add("vars.preRoundLimit", DispatchVarsPreRoundLimitResponse);
            ResponseDelegates.Add("admin.roundStartTimerEnabled", DispatchAdminRoundStartTimerEnabledResponse);
            ResponseDelegates.Add("vars.roundStartTimerDelay", DispatchVarsRoundStartTimerDelayResponse);
            ResponseDelegates.Add("vars.roundStartTimerPlayersLimit", DispatchVarsRoundStartTimerPlayersLimitResponse);

            // New map functions?
            ResponseDelegates.Add("admin.stopPreRound", DispatchAdminStopPreRoundResponse);

            // Note: These delegates point to methods in FrostbiteClient.
            ResponseDelegates.Add("reservedSpectateSlots.configFile", DispatchReservedSlotsConfigFileResponse);
            ResponseDelegates.Add("reservedSpectateSlots.load", DispatchReservedSlotsLoadResponse);
            ResponseDelegates.Add("reservedSpectateSlots.save", DispatchReservedSlotsSaveResponse);
            ResponseDelegates.Add("reservedSpectateSlots.addPlayer", DispatchReservedSlotsAddPlayerResponse);
            ResponseDelegates.Add("reservedSpectateSlots.removePlayer", DispatchReservedSlotsRemovePlayerResponse);
            ResponseDelegates.Add("reservedSpectateSlots.clear", DispatchReservedSlotsClearResponse);
            ResponseDelegates.Add("reservedSpectateSlots.list", DispatchReservedSlotsListResponse);

            GetPacketsPattern = new Regex(GetPacketsPattern + "|^reservedSpectateSlots.list|^admin.roundStartTimerEnabled$|^admin.tdmScoreCounterMaxScore$", RegexOptions.Compiled);
        }
开发者ID:EBassie,项目名称:Procon-1,代码行数:29,代码来源:MoHClient.cs

示例2: DispatchPlayerOnSpawnRequest

 protected override void DispatchPlayerOnSpawnRequest(FrostbiteConnection sender, Packet cpRequestPacket) {
     if (cpRequestPacket.Words.Count >= 9) {
         if (this.PlayerSpawned != null) {
             FrostbiteConnection.RaiseEvent(this.PlayerSpawned.GetInvocationList(), this, cpRequestPacket.Words[1], cpRequestPacket.Words[2], cpRequestPacket.Words.GetRange(3, 3), cpRequestPacket.Words.GetRange(6, 3)); // new Inventory(cpRequestPacket.Words[3], cpRequestPacket.Words[4], cpRequestPacket.Words[5], cpRequestPacket.Words[6], cpRequestPacket.Words[7], cpRequestPacket.Words[8]));
         }
     }
 }
开发者ID:ratdart,项目名称:Procon-1,代码行数:7,代码来源:BFClient.cs

示例3: BFBC2Client

        public BFBC2Client(FrostbiteConnection connection) : base(connection) {
            #region Map list functions

            ResponseDelegates.Add("admin.getPlaylist", DispatchAdminGetPlaylistResponse);
            ResponseDelegates.Add("admin.setPlaylist", DispatchAdminSetPlaylistResponse);

            // Note: These delegates point to methods in FrostbiteClient.
            ResponseDelegates.Add("admin.runNextLevel", DispatchAdminRunNextRoundResponse);
            ResponseDelegates.Add("admin.currentLevel", DispatchAdminCurrentLevelResponse);

            #endregion

            //this.m_responseDelegates.Add("vars.rankLimit", this.DispatchVarsRankLimitResponse);

            // Note: These delegates point to methods in FrostbiteClient.
            ResponseDelegates.Add("reservedSlots.configFile", DispatchReservedSlotsConfigFileResponse);
            ResponseDelegates.Add("reservedSlots.load", DispatchReservedSlotsLoadResponse);
            ResponseDelegates.Add("reservedSlots.save", DispatchReservedSlotsSaveResponse);
            ResponseDelegates.Add("reservedSlots.addPlayer", DispatchReservedSlotsAddPlayerResponse);
            ResponseDelegates.Add("reservedSlots.removePlayer", DispatchReservedSlotsRemovePlayerResponse);
            ResponseDelegates.Add("reservedSlots.clear", DispatchReservedSlotsClearResponse);
            ResponseDelegates.Add("reservedSlots.list", DispatchReservedSlotsListResponse);

            GetPacketsPattern = new Regex(GetPacketsPattern + "|^admin.getPlaylist|^reservedSlots.list", RegexOptions.Compiled);
        }
开发者ID:bensonk,项目名称:Procon-1,代码行数:25,代码来源:BFBC2Client.cs

示例4: BFHLClient

 public BFHLClient(FrostbiteConnection connection) : base(connection) {
     ResponseDelegates.Add("vars.roundStartReadyPlayersNeeded", DispatchVarsRoundStartReadyPlayersNeeded);
     // need to review vars.requireReadyPlayersToStart / vars.roundStartReadyPlayersPercent
     // vars.TeamSwitchCooldown
     // vars.teamSwitchingAllowed
     // vars.roundsToWin
     // undocumented vars.killFeed
     ResponseDelegates.Add("vars.hacker", DispatchVarsCommander);
 }
开发者ID:markrlomas,项目名称:Procon-1,代码行数:9,代码来源:BFHLClient.cs

示例5: DispatchVarsRoundStartReadyPlayersNeeded

        protected virtual void DispatchVarsRoundStartReadyPlayersNeeded(FrostbiteConnection sender, Packet cpRecievedPacket, Packet cpRequestPacket) {
            if (cpRequestPacket.Words.Count >= 1) {
                var handler = this.RoundStartReadyPlayersNeeded;

                if (handler != null) {
                    if (cpRecievedPacket.Words.Count == 2) {
                        handler(this, Convert.ToInt32(cpRecievedPacket.Words[1]));
                    }
                    else if (cpRequestPacket.Words.Count >= 2) {
                        handler(this, Convert.ToInt32(cpRequestPacket.Words[1]));
                    }
                }
            }
        }
开发者ID:markrlomas,项目名称:Procon-1,代码行数:14,代码来源:BFHLClient.cs

示例6: BFClient

        public BFClient(FrostbiteConnection connection)
            : base(connection) {

            this.ResponseDelegates.Add("vars.rankLimit", this.DispatchVarsRankLimitResponse);
            this.ResponseDelegates.Add("vars.teamBalance", this.DispatchVarsTeamBalanceResponse);
            this.ResponseDelegates.Add("vars.killCam", this.DispatchVarsKillCamResponse);
            this.ResponseDelegates.Add("vars.miniMap", this.DispatchVarsMiniMapResponse);
            this.ResponseDelegates.Add("vars.crossHair", this.DispatchVarsCrossHairResponse);
            this.ResponseDelegates.Add("vars.3dSpotting", this.DispatchVars3dSpottingResponse);
            this.ResponseDelegates.Add("vars.miniMapSpotting", this.DispatchVarsMiniMapSpottingResponse);
            this.ResponseDelegates.Add("vars.thirdPersonVehicleCameras", this.DispatchVarsThirdPersonVehicleCamerasResponse);

            this.ResponseDelegates.Add("admin.password", this.DispatchVarsAdminPasswordResponse);

            this.GetPacketsPattern = new Regex(this.GetPacketsPattern.ToString() + "|^admin.getPlaylist|^reservedSlots.list", RegexOptions.Compiled);
        }
开发者ID:NSGod,项目名称:Procon-1,代码行数:16,代码来源:BFClient.cs

示例7: BFBC2Client

        public BFBC2Client(FrostbiteConnection connection)
            : base(connection)
        {
            this.VersionNumberToFriendlyName = new Dictionary<string, string>();
            /*{
              { "571287", "R21" },
              { "581637", "R22" },
              { "584642", "R23" },
              { "593485", "R24" },
              { "602833", "R25" },
              { "609063", "R26" },
              { "617877", "R27" },
              { "621775", "R28" }
            };*/

            #region Map list functions

            this.m_responseDelegates.Add("admin.getPlaylist", this.DispatchAdminGetPlaylistResponse);
            this.m_responseDelegates.Add("admin.setPlaylist", this.DispatchAdminSetPlaylistResponse);

            // Note: These delegates point to methods in FrostbiteClient.
            this.m_responseDelegates.Add("admin.runNextLevel", this.DispatchAdminRunNextRoundResponse);
            this.m_responseDelegates.Add("admin.currentLevel", this.DispatchAdminCurrentLevelResponse);

            #endregion

            this.m_responseDelegates.Add("vars.rankLimit", this.DispatchVarsRankLimitResponse);
            this.m_responseDelegates.Add("vars.teamBalance", this.DispatchVarsTeamBalanceResponse);
            this.m_responseDelegates.Add("vars.killCam", this.DispatchVarsKillCamResponse);
            this.m_responseDelegates.Add("vars.miniMap", this.DispatchVarsMiniMapResponse);
            this.m_responseDelegates.Add("vars.crossHair", this.DispatchVarsCrossHairResponse);
            this.m_responseDelegates.Add("vars.3dSpotting", this.DispatchVars3dSpottingResponse);
            this.m_responseDelegates.Add("vars.miniMapSpotting", this.DispatchVarsMiniMapSpottingResponse);
            this.m_responseDelegates.Add("vars.thirdPersonVehicleCameras", this.DispatchVarsThirdPersonVehicleCamerasResponse);

            // Note: These delegates point to methods in FrostbiteClient.
            this.m_responseDelegates.Add("reservedSlots.configFile", this.DispatchReservedSlotsConfigFileResponse);
            this.m_responseDelegates.Add("reservedSlots.load", this.DispatchReservedSlotsLoadResponse);
            this.m_responseDelegates.Add("reservedSlots.save", this.DispatchReservedSlotsSaveResponse);
            this.m_responseDelegates.Add("reservedSlots.addPlayer", this.DispatchReservedSlotsAddPlayerResponse);
            this.m_responseDelegates.Add("reservedSlots.removePlayer", this.DispatchReservedSlotsRemovePlayerResponse);
            this.m_responseDelegates.Add("reservedSlots.clear", this.DispatchReservedSlotsClearResponse);
            this.m_responseDelegates.Add("reservedSlots.list", this.DispatchReservedSlotsListResponse);

            this.GetPacketsPattern = new Regex(this.GetPacketsPattern.ToString() + "|^admin.getPlaylist|^reservedSlots.list", RegexOptions.Compiled);
        }
开发者ID:eaceaser,项目名称:PRoCon,代码行数:46,代码来源:BFBC2Client.cs

示例8: MoHClient

        public MoHClient(FrostbiteConnection connection)
            : base(connection)
        {
            this.VersionNumberToFriendlyName = new Dictionary<string, string>();
            /*{
                { "577887", "R2" },
                { "582779", "R3" },
                { "586627", "R5" },
                { "586981", "R6" },
                { "587960", "R7" },
                { "592364", "R8" },
                { "615937", "R9" },
            };*/

            this.m_responseDelegates.Add("vars.clanTeams", this.DispatchVarsClanTeamsResponse);
            this.m_responseDelegates.Add("vars.noCrosshairs", this.DispatchVarsNoCrosshairsResponse);
            this.m_responseDelegates.Add("vars.realisticHealth", this.DispatchVarsRealisticHealthResponse);
            this.m_responseDelegates.Add("vars.noUnlocks", this.DispatchVarsNoUnlocksResponse);
            this.m_responseDelegates.Add("vars.skillLimit", this.DispatchVarsSkillLimitResponse);
            this.m_responseDelegates.Add("vars.noAmmoPickups", this.DispatchVarsNoAmmoPickupsResponse);
            this.m_responseDelegates.Add("vars.tdmScoreCounterMaxScore", this.DispatchVarsTdmScoreCounterMaxScoreResponse);

            // Preround vars
            this.m_responseDelegates.Add("vars.preRoundLimit", this.DispatchVarsPreRoundLimitResponse);
            this.m_responseDelegates.Add("admin.roundStartTimerEnabled", this.DispatchAdminRoundStartTimerEnabledResponse);
            this.m_responseDelegates.Add("vars.roundStartTimerDelay", this.DispatchVarsRoundStartTimerDelayResponse);
            this.m_responseDelegates.Add("vars.roundStartTimerPlayersLimit", this.DispatchVarsRoundStartTimerPlayersLimitResponse);

            // New map functions?
            this.m_responseDelegates.Add("admin.stopPreRound", this.DispatchAdminStopPreRoundResponse);

            // Note: These delegates point to methods in FrostbiteClient.
            this.m_responseDelegates.Add("reservedSpectateSlots.configFile", this.DispatchReservedSlotsConfigFileResponse);
            this.m_responseDelegates.Add("reservedSpectateSlots.load", this.DispatchReservedSlotsLoadResponse);
            this.m_responseDelegates.Add("reservedSpectateSlots.save", this.DispatchReservedSlotsSaveResponse);
            this.m_responseDelegates.Add("reservedSpectateSlots.addPlayer", this.DispatchReservedSlotsAddPlayerResponse);
            this.m_responseDelegates.Add("reservedSpectateSlots.removePlayer", this.DispatchReservedSlotsRemovePlayerResponse);
            this.m_responseDelegates.Add("reservedSpectateSlots.clear", this.DispatchReservedSlotsClearResponse);
            this.m_responseDelegates.Add("reservedSpectateSlots.list", this.DispatchReservedSlotsListResponse);

            this.GetPacketsPattern = new Regex(this.GetPacketsPattern.ToString() + "|^reservedSpectateSlots.list|^admin.roundStartTimerEnabled$|^admin.tdmScoreCounterMaxScore$", RegexOptions.Compiled);
        }
开发者ID:eaceaser,项目名称:PRoCon,代码行数:42,代码来源:MoHClient.cs

示例9: DispatchPunkBusterOnMessageRequest

 protected virtual void DispatchPunkBusterOnMessageRequest(FrostbiteConnection sender, Packet cpRequestPacket) {
     if (cpRequestPacket.Words.Count >= 2) {
         if (PunkbusterMessage != null) {
             this.PunkbusterMessage(this, cpRequestPacket.Words[1]);
         }
     }
 }
开发者ID:markrlomas,项目名称:Procon-1,代码行数:7,代码来源:FrostbiteClient.cs

示例10: DispatchServerOnRoundOverPlayersRequest

 protected virtual void DispatchServerOnRoundOverPlayersRequest(FrostbiteConnection sender, Packet cpRequestPacket) {
     if (cpRequestPacket.Words.Count >= 2) {
         cpRequestPacket.Words.RemoveAt(0);
         if (RoundOverPlayers != null) {
             this.RoundOverPlayers(this, CPlayerInfo.GetPlayerList(cpRequestPacket.Words));
         }
     }
 }
开发者ID:markrlomas,项目名称:Procon-1,代码行数:8,代码来源:FrostbiteClient.cs

示例11: DispatchServerOnLevelStartedRequest

 protected virtual void DispatchServerOnLevelStartedRequest(FrostbiteConnection sender, Packet cpRequestPacket) {
     if (cpRequestPacket.Words.Count >= 1) {
         if (LevelStarted != null) {
             this.LevelStarted(this);
         }
     }
 }
开发者ID:markrlomas,项目名称:Procon-1,代码行数:7,代码来源:FrostbiteClient.cs

示例12: DispatchPlayerOnSpawnRequest

 protected virtual void DispatchPlayerOnSpawnRequest(FrostbiteConnection sender, Packet cpRequestPacket) {
     if (cpRequestPacket.Words.Count >= 9) {
         if (PlayerSpawned != null) {
             this.PlayerSpawned(this, cpRequestPacket.Words[1], cpRequestPacket.Words[2], cpRequestPacket.Words.GetRange(3, 3), cpRequestPacket.Words.GetRange(6, 3)); // new Inventory(cpRequestPacket.Words[3], cpRequestPacket.Words[4], cpRequestPacket.Words[5], cpRequestPacket.Words[6], cpRequestPacket.Words[7], cpRequestPacket.Words[8]));
         }
     }
 }
开发者ID:markrlomas,项目名称:Procon-1,代码行数:7,代码来源:FrostbiteClient.cs

示例13: DispatchPlayerOnTeamChangeRequest

        protected virtual void DispatchPlayerOnTeamChangeRequest(FrostbiteConnection sender, Packet cpRequestPacket) {
            if (cpRequestPacket.Words.Count >= 4) {
                int iTeamID = 0, iSquadID = 0;

                // TO DO: Specs say TeamId and SquadId which is a little odd..
                if (int.TryParse(cpRequestPacket.Words[2], out iTeamID) == true && int.TryParse(cpRequestPacket.Words[3], out iSquadID) == true) {
                    if (PlayerChangedTeam != null) {
                        this.PlayerChangedTeam(this, cpRequestPacket.Words[1], iTeamID, iSquadID);
                    }
                }
            }
        }
开发者ID:markrlomas,项目名称:Procon-1,代码行数:12,代码来源:FrostbiteClient.cs

示例14: DispatchPlayerOnChatRequest

        protected virtual void DispatchPlayerOnChatRequest(FrostbiteConnection sender, Packet cpRequestPacket) {
            if (cpRequestPacket.Words.Count >= 3) {
                int iTeamID = 0, iSquadID = 0;

                if (cpRequestPacket.Words.Count == 3) {
                    // < R9 Support.
                    if (GlobalChat != null) {
                        this.GlobalChat(this, cpRequestPacket.Words[1], cpRequestPacket.Words[2]);
                    }
                    if (TeamChat != null) {
                        this.TeamChat(this, cpRequestPacket.Words[1], cpRequestPacket.Words[2], 0);
                    }
                    if (SquadChat != null) {
                        this.SquadChat(this, cpRequestPacket.Words[1], cpRequestPacket.Words[2], 0, 0);
                    }
                }
                else if (cpRequestPacket.Words.Count == 4 && (String.Compare(cpRequestPacket.Words[3], "all", StringComparison.OrdinalIgnoreCase) == 0 || String.Compare(cpRequestPacket.Words[3], "unknown", StringComparison.OrdinalIgnoreCase) == 0)) {
                    // "unknown" because of BF4 beta
                    if (GlobalChat != null) {
                        this.GlobalChat(this, cpRequestPacket.Words[1], cpRequestPacket.Words[2]);
                    }
                }
                else if (cpRequestPacket.Words.Count >= 5 && String.Compare(cpRequestPacket.Words[3], "team", StringComparison.OrdinalIgnoreCase) == 0 && int.TryParse(cpRequestPacket.Words[4], out iTeamID) == true) {
                    if (this.TeamChat != null) {
                        this.TeamChat(this, cpRequestPacket.Words[1], cpRequestPacket.Words[2], iTeamID);
                    }
                }
                else if (cpRequestPacket.Words.Count >= 5 && String.Compare(cpRequestPacket.Words[3], "player", StringComparison.OrdinalIgnoreCase) == 0) {
                    if (this.PlayerChat != null) {
                        this.PlayerChat(this, cpRequestPacket.Words[1], cpRequestPacket.Words[2], cpRequestPacket.Words[4]);
                    }
                }
                else if (cpRequestPacket.Words.Count >= 6 && String.Compare(cpRequestPacket.Words[3], "squad", StringComparison.OrdinalIgnoreCase) == 0 && int.TryParse(cpRequestPacket.Words[4], out iTeamID) == true && int.TryParse(cpRequestPacket.Words[5], out iSquadID) == true) {
                    if (SquadChat != null) {
                        this.SquadChat(this, cpRequestPacket.Words[1], cpRequestPacket.Words[2], iTeamID, iSquadID);
                    }
                }

                cpRequestPacket.Words.RemoveAt(0);
                if (Chat != null) {
                    this.Chat(this, cpRequestPacket.Words);
                }
            }
        }
开发者ID:markrlomas,项目名称:Procon-1,代码行数:44,代码来源:FrostbiteClient.cs

示例15: DispatchLevelVarsGetResponse

        protected virtual void DispatchLevelVarsGetResponse(FrostbiteConnection sender, Packet cpRecievedPacket, Packet cpRequestPacket) {
            if (cpRecievedPacket.Words.Count >= 2 && cpRequestPacket.Words.Count >= 2) {
                LevelVariable request = LevelVariable.ExtractContextVariable(false, cpRequestPacket.Words.GetRange(1, cpRequestPacket.Words.Count - 1));

                request.RawValue = cpRecievedPacket.Words[1];

                if (LevelVariablesGet != null) {
                    this.LevelVariablesGet(this, request, null);
                }
            }
        }
开发者ID:markrlomas,项目名称:Procon-1,代码行数:11,代码来源:FrostbiteClient.cs


注:本文中的PRoCon.Core.Remote.FrostbiteConnection类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。