當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。