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:
2026-07-30 12:15:54 +08:00
co-authored by Claude Opus 5
parent 5839b423ae
commit 3665504a58
13 changed files with 176 additions and 4 deletions
@@ -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>();