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


C# PlayerStats.reset方法代码示例

本文整理汇总了C#中PlayerStats.reset方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerStats.reset方法的具体用法?C# PlayerStats.reset怎么用?C# PlayerStats.reset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PlayerStats的用法示例。


在下文中一共展示了PlayerStats.reset方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnListPlayers


//.........这里部分代码省略.........
                            {
                                this.dicPlayerCache[cpiPlayer.SoldierName].playerValue = this.dicPlayerCache[cpiPlayer.SoldierName].TBvalue;
                            }
                        }
                        else if (this.strcurrentGametype.Contains("TeamDeathMatch"))
                        {
                            if (this.ScrambleByTDM == "Rank"){
                                this.dicPlayerCache[cpiPlayer.SoldierName].playerValue = this.dicPlayerCache[cpiPlayer.SoldierName].rank;
                            }else if (this.ScrambleByTDM == "Skill"){
                                this.dicPlayerCache[cpiPlayer.SoldierName].playerValue = this.dicPlayerCache[cpiPlayer.SoldierName].skill;
                            }else if (this.ScrambleByTDM == "SPM"){
                                this.dicPlayerCache[cpiPlayer.SoldierName].playerValue = this.dicPlayerCache[cpiPlayer.SoldierName].spm;
                            }else if (this.ScrambleByTDM == "SPMcombat"){
                                this.dicPlayerCache[cpiPlayer.SoldierName].playerValue = this.dicPlayerCache[cpiPlayer.SoldierName].spmcombat;
                            }else if (this.ScrambleByTDM == "K/D"){
                                this.dicPlayerCache[cpiPlayer.SoldierName].playerValue = this.dicPlayerCache[cpiPlayer.SoldierName].kdr;
                            }
                            else if (this.ScrambleByTDM == "TB-Value")
                            {
                                this.dicPlayerCache[cpiPlayer.SoldierName].playerValue = this.dicPlayerCache[cpiPlayer.SoldierName].TBvalue;
                            }
                        }
                        
                        
                        
                        if ( (  ((IList<string>)this.strAWhitelistComplete).Contains(cpiPlayer.SoldierName) || ( ((IList<string>)this.strAClantagWhitelist).Contains(dicPlayerCache[cpiPlayer.SoldierName].tag) && dicPlayerCache[cpiPlayer.SoldierName].tag != String.Empty )  )   && this.ynbWhitelist == enumBoolYesNo.Yes)
                        {
                            this.dicPlayerCache[cpiPlayer.SoldierName].playerWL = 1;
                        }
                    }
                    else
                    {
                        PlayerStats stats = new PlayerStats();
                        stats.reset();

                        /* If stats fetching is taking too long, skip for the rest of the current players list */

                        if (numStatsFetch > 0)
                        {
                            DebugInfoSkill("Starting Battlelog stats fetch for: ^b^5" + cpiPlayer.SoldierName);
                            DateTime startTime = DateTime.Now;

                            if (Servertype == "BF3")
                            {
                                stats = this.bclient.getPlayerStats(cpiPlayer.SoldierName, BattlelogClient.ServerType.BF3);
                            }
                            if (Servertype == "BF4")
                            {
                                stats = this.bclient.getPlayerStats(cpiPlayer.SoldierName, BattlelogClient.ServerType.BF4);
                            }

                            stats.statsFetched = true;

                            String name = (stats.tag != String.Empty) ? "[" + stats.tag + "]" + cpiPlayer.SoldierName : cpiPlayer.SoldierName;
                            DebugInfoSkill("^5^b" + name + "^n^9 stats fetched, rank is " + stats.rank + ", spm is " + stats.spm.ToString("F0") + ", ^b" + numRemaining + "^n players still need stats. ^2ELAPSED TIME: " + DateTime.Now.Subtract(startTime).TotalSeconds.ToString("F1") + " seconds");

                            --numStatsFetch;
                        }

                        double ValueTemp = 0;
                        
                        double tempskill = stats.skill;
                        
                        if (tempskill == 0)
                            tempskill = (this.skillA + this.skillB) / 2;
                        else if (tempskill < 0)
开发者ID:Pure-Battlefield,项目名称:TrueBalancer-PURE,代码行数:67,代码来源:TrueBalancer.cs


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