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


C# PlayerSquad.getRandomValue方法代码示例

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


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

示例1: getSortFieldValueStr

        private string getSortFieldValueStr(PlayerSquad squad, string phase) {
            string sort_method = getStringVarValue(phase);

            if (sort_method.CompareTo("kdr_asc_round") == 0 || sort_method.CompareTo("kdr_desc_round") == 0)
                return "kdr_round: " + Math.Round(squad.getRoundKdr(), 2);
            else if (sort_method.CompareTo("score_asc_round") == 0 || sort_method.CompareTo("score_desc_round") == 0)
                return "score_round: " + Math.Round(squad.getRoundScore(), 2);
            else if (sort_method.CompareTo("spm_asc_round") == 0 || sort_method.CompareTo("spm_desc_round") == 0)
                return "spm_round: " + Math.Round(squad.getRoundSpm(), 2);
            else if (sort_method.CompareTo("kpm_asc_round") == 0 || sort_method.CompareTo("kpm_desc_round") == 0)
                return "kpm_round: " + Math.Round(squad.getRoundKpm(), 2);
            else if (sort_method.CompareTo("time_asc_round") == 0 || sort_method.CompareTo("time_desc_round") == 0)
                return "time_round: " + squad.getRoundTime();
            else if (sort_method.CompareTo("random_value") == 0 || sort_method.CompareTo("random_value") == 0)
                return "random_value: " + squad.getRandomValue();
            else if (sort_method.CompareTo("kdr_asc_online") == 0 || sort_method.CompareTo("kdr_desc_online") == 0)
                return "kdr_online: " + Math.Round(squad.getOnlineKdr(), 2);
            else if (sort_method.CompareTo("kpm_asc_online") == 0 || sort_method.CompareTo("kpm_desc_online") == 0)
                return "kpm_online: " + Math.Round(squad.getOnlineKpm(), 2);
            else if (sort_method.CompareTo("spm_asc_online") == 0 || sort_method.CompareTo("spm_desc_online") == 0)
                return "spm_online: " + Math.Round(squad.getOnlineSpm(), 2);
            else if (sort_method.CompareTo("kills_asc_online") == 0 || sort_method.CompareTo("kills_desc_online") == 0)
                return "kills_online: " + Math.Round(squad.getOnlineKills(), 2);
            else if (sort_method.CompareTo("deaths_asc_online") == 0 || sort_method.CompareTo("deaths_desc_online") == 0)
                return "deaths_online: " + Math.Round(squad.getOnlineDeaths(), 2);
            else if (sort_method.CompareTo("skill_asc_online") == 0 || sort_method.CompareTo("skill_desc_online") == 0)
                return "skill_online: " + Math.Round(squad.getOnlineSkill(), 2);
            else if (sort_method.CompareTo("quits_asc_online") == 0 || sort_method.CompareTo("quits_desc_online") == 0)
                return "quits_online: " + Math.Round(squad.getOnlineQuits(), 2);
            else if (sort_method.CompareTo("accuracy_asc_online") == 0 || sort_method.CompareTo("accuracy_desc_online") == 0)
                return "accuracy_online: " + Math.Round(squad.getOnlineAccuracy(), 2);
            else if (sort_method.CompareTo("score_asc_online") == 0 || sort_method.CompareTo("score_desc_online") == 0)
                return "score_online: " + Math.Round(squad.getOnlineScore(), 2);
            else if (sort_method.CompareTo("rank_asc_online") == 0 || sort_method.CompareTo("rank_desc_online") == 0)
                return "rank_online: " + Math.Round(squad.getOnlineRank(), 2);

            DebugWrite("^1^bWARNING^0^n: cannot find squad sort method for ^b" + sort_method + "^0", 1);
            return "";
        }
开发者ID:ratdart,项目名称:Procon-1,代码行数:39,代码来源:InsaneBalancer.cs

示例2: squad_random_value_cmp

 private int squad_random_value_cmp(PlayerSquad left, PlayerSquad right) {
     int lval = left.getRandomValue();
     int rval = right.getRandomValue();
     return lval.CompareTo(rval);
 }
开发者ID:ratdart,项目名称:Procon-1,代码行数:5,代码来源:InsaneBalancer.cs


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