本文整理汇总了C#中PlayerProfile.getOnlineKills方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerProfile.getOnlineKills方法的具体用法?C# PlayerProfile.getOnlineKills怎么用?C# PlayerProfile.getOnlineKills使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlayerProfile
的用法示例。
在下文中一共展示了PlayerProfile.getOnlineKills方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: getSortFieldValueStr
private string getSortFieldValueStr(PlayerProfile player, 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(player.getRoundKdr(), 2);
else if (sort_method.CompareTo("score_asc_round") == 0 || sort_method.CompareTo("score_desc_round") == 0)
return "score_round: " + Math.Round(player.getRoundScore(), 2);
else if (sort_method.CompareTo("spm_asc_round") == 0 || sort_method.CompareTo("spm_desc_round") == 0)
return "spm_round: " + Math.Round(player.getRoundSpm(), 2);
else if (sort_method.CompareTo("kpm_asc_round") == 0 || sort_method.CompareTo("kpm_desc_round") == 0)
return "kpm_round: " + Math.Round(player.getRoundKpm(), 2);
else if (sort_method.CompareTo("time_asc_round") == 0 || sort_method.CompareTo("time_desc_round") == 0)
return "time_round: " + player.getRoundTime();
else if (sort_method.CompareTo("random_value") == 0 || sort_method.CompareTo("random_value") == 0)
return "random_value: " + player.getRandomValue();
else if (sort_method.CompareTo("kdr_asc_online") == 0 || sort_method.CompareTo("kdr_desc_online") == 0)
return "kdr_online: " + Math.Round(player.getOnlineKdr(), 2);
else if (sort_method.CompareTo("kpm_asc_online") == 0 || sort_method.CompareTo("kpm_desc_online") == 0)
return "kpm_online: " + Math.Round(player.getOnlineKpm(), 2);
else if (sort_method.CompareTo("spm_asc_online") == 0 || sort_method.CompareTo("spm_desc_online") == 0)
return "spm_online: " + Math.Round(player.getOnlineSpm(), 2);
else if (sort_method.CompareTo("kills_asc_online") == 0 || sort_method.CompareTo("kills_desc_online") == 0)
return "kills_online: " + player.getOnlineKills();
else if (sort_method.CompareTo("deaths_asc_online") == 0 || sort_method.CompareTo("deaths_desc_online") == 0)
return "deaths_online: " + player.getOnlineDeaths();
else if (sort_method.CompareTo("skill_asc_online") == 0 || sort_method.CompareTo("skill_desc_online") == 0)
return "skill_online: " + Math.Round(player.getOnlineSkill(), 2);
else if (sort_method.CompareTo("quits_asc_online") == 0 || sort_method.CompareTo("quits_desc_online") == 0)
return "quits_online: " + Math.Round(player.getOnlineQuits(), 2);
else if (sort_method.CompareTo("accuracy_asc_online") == 0 || sort_method.CompareTo("accuracy_desc_online") == 0)
return "accuracy_online: " + Math.Round(player.getOnlineAccuracy(), 2);
else if (sort_method.CompareTo("score_asc_online") == 0 || sort_method.CompareTo("score_desc_online") == 0)
return "score_online: " + player.getOnlineScore();
else if (sort_method.CompareTo("rank_asc_online") == 0 || sort_method.CompareTo("rank_desc_online") == 0)
return "rank_online: " + player.getOnlineRank();
DebugWrite("^1^bWARNING^0^n: cannot find player sort method for ^b" + sort_method + "^0", 1);
return "";
}
示例2: player_kills_asc_online_cmp
private int player_kills_asc_online_cmp(PlayerProfile left, PlayerProfile right) {
double lval = left.getOnlineKills();
double rval = right.getOnlineKills();
return lval.CompareTo(rval);
}