本文整理汇总了C#中AttackableUnit.GetRealAutoAttackRange方法的典型用法代码示例。如果您正苦于以下问题:C# AttackableUnit.GetRealAutoAttackRange方法的具体用法?C# AttackableUnit.GetRealAutoAttackRange怎么用?C# AttackableUnit.GetRealAutoAttackRange使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AttackableUnit
的用法示例。
在下文中一共展示了AttackableUnit.GetRealAutoAttackRange方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsValidUnit
/// <summary>
/// Returns possible minions based on settings.
/// </summary>
/// <param name="mode">
/// The requested mode
/// </param>
/// <returns>
/// The <see cref="List{Obj_AI_Minion}" />.
/// </returns>
/// <summary>
/// Determines whether the unit is valid.
/// </summary>
/// <param name="unit">
/// The unit.
/// </param>
/// <param name="range">
/// The range.
/// </param>
/// <returns>
/// The <see cref="bool" />.
/// </returns>
private bool IsValidUnit(AttackableUnit unit, float range = 0f)
{
var minion = unit as Obj_AI_Minion;
return unit.IsValidTarget(range > 0 ? range : unit.GetRealAutoAttackRange())
&& (minion == null || minion.IsHPBarRendered);
}
示例2: IsValidUnit
/// <summary>
/// Determines whether the unit is valid.
/// </summary>
/// <param name="unit">
/// The unit.
/// </param>
/// <param name="range">
/// The range.
/// </param>
/// <returns>
/// The <see cref="bool" />.
/// </returns>
private static bool IsValidUnit(AttackableUnit unit, float range = 0f)
{
return unit.LSIsValidTarget(range > 0 ? range : unit.GetRealAutoAttackRange());
}