18 lines
833 B
C#
18 lines
833 B
C#
namespace BaseGames.Enemies.Abilities
|
|
{
|
|
/// <summary>
|
|
/// 攻击选择器的候选契约。攻击类 <see cref="EnemyAbilityBase"/> 实现之;
|
|
/// 抽象出来使 <see cref="EnemyAttackSelector"/> 可脱离 MonoBehaviour 单测。
|
|
/// </summary>
|
|
public interface IAttackCandidate
|
|
{
|
|
bool CanUse { get; } // 未冷却 + 未运行 + 存活
|
|
bool RequiresLineOfSight { get; } // 是否需要视线(由敌人级 LOS 提供)
|
|
bool RequiresGrounded { get; } // 是否需要着地
|
|
float Weight { get; } // WeightedRandom 权重
|
|
int Priority { get; } // Priority 优先级
|
|
bool InAttackRange(); // 招式自管圆形射程内是否有玩家
|
|
bool Execute(); // 触发本招
|
|
}
|
|
}
|