感知门面 EnemyBase.InChaseZone(追逐/aggro)/InVisionZone(视野/los,缺省回退aggro),纯查询; 转换逻辑归 AI 层: 新增可复用 PerceptionStateMachine(统一规则,HasAlert/视野缺省自动降级); 规则: 未发现进视野→警觉, 进追逐→追击(委托能力), 追击脱离视野→巡逻(永不回警觉,再进视野再警觉). EnemyStatsSO.HasAlertState 勾选项; ContactChaseAbility 改纯执行器(退出由AI中断); E001 用可复用件. PlayMode 验证四态转换全通过. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
13 lines
517 B
C#
13 lines
517 B
C#
namespace BaseGames.AI
|
|
{
|
|
/// <summary>战斗/能力调度接口(第 3 阶段由 CombatantAdapter 适配能力注册表)。</summary>
|
|
public interface ICombatant
|
|
{
|
|
bool UseAbility(string abilityId);
|
|
bool IsAbilityRunning(string abilityId = null); // null = 任意能力
|
|
bool NoAbilityRunning { get; }
|
|
bool CanUseAbility(string abilityId);
|
|
void InterruptAbilities(); // 中断当前所有能力(如退出追击时停追击能力)
|
|
}
|
|
}
|