本文整理汇总了C#中UltimateModeType.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# UltimateModeType.ToString方法的具体用法?C# UltimateModeType.ToString怎么用?C# UltimateModeType.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UltimateModeType
的用法示例。
在下文中一共展示了UltimateModeType.ToString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetModeString
private string GetModeString(UltimateModeType mode)
{
if (mode == UltimateModeType.Flash)
{
mode = UltimateModeType.Assisted;
}
return mode.ToString().ToLower();
}
示例2: GetModeString
private string GetModeString(UltimateModeType mode, bool overrideFlash)
{
if (overrideFlash && mode == UltimateModeType.Flash)
{
mode = UltimateModeType.Assisted;
}
return mode.ToString().ToLower();
}
示例3: Check
public static bool Check(UltimateModeType mode,
int min,
List<Obj_AI_Hero> hits,
Func<Obj_AI_Hero, float> calcDamage = null)
{
try
{
var modeString = mode.ToString().ToLower();
if (_menu == null || hits == null || !hits.Any())
{
return false;
}
if (_force && HeroListManager.Enabled("ultimate-force"))
{
var killable = _menu.Item(_menu.Name + ".ultimate.force.combo-killable").GetValue<bool>();
var additional = _menu.Item(_menu.Name + ".ultimate.force.additional").GetValue<Slider>().Value;
var damageMulti =
(_menu.Item(_menu.Name + ".ultimate.single.damage.percent").GetValue<Slider>().Value / 100f);
if (
hits.Any(
hit =>
HeroListManager.Check("ultimate-force", hit) &&
(!killable || calcDamage == null || calcDamage(hit) * damageMulti > hit.Health)) &&
hits.Count >= additional + 1)
{
return true;
}
}
if (_required && HeroListManager.Enabled("ultimate-required-" + modeString))
{
var minReq =
_menu.Item(_menu.Name + ".ultimate." + modeString + ".required.min").GetValue<Slider>().Value;
var enabledHeroes = HeroListManager.GetEnabledHeroes("ultimate-required-" + modeString);
if (minReq > 0 && enabledHeroes.Count > 0)
{
var count =
enabledHeroes.Where(
e => !e.IsDead && e.IsVisible && e.Distance(ObjectManager.Player) <= 2000)
.Count(e => hits.Any(h => h.NetworkId.Equals(e.NetworkId)));
if (count < minReq)
{
return false;
}
}
}
return hits.Count >= min;
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
return false;
}