feat(ai): 新增 IBossControl facet——Boss 阶段状态经 IAiContext 供图读取
非 Boss 敌人访问 IAiContext.Boss 显式抛 InvalidOperationException, 不返回空对象掩盖小怪图误挂 Boss 边的错误。BossResource 补 IsFull 供图条件边判定。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -26,6 +26,10 @@ namespace BaseGames.Boss
|
||||
public float NormalizedValue => _config != null && _config.maxValue > 0f
|
||||
? _currentValue / _config.maxValue : 0f;
|
||||
|
||||
/// <summary>资源是否已达上限(供 AI 图条件边判定"可放大招")。</summary>
|
||||
public bool IsFull => _config != null && _config.maxValue > 0f
|
||||
&& _currentValue >= _config.maxValue;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (_boss == null) _boss = GetComponentInParent<BossBase>();
|
||||
|
||||
Reference in New Issue
Block a user