test(ai): 补测经 AiStateFragments 的跨模块状态撞名,State() 补引导注释

This commit is contained in:
2026-07-29 12:11:07 +08:00
parent 80fdc36762
commit 894ae99984
2 changed files with 26 additions and 0 deletions
+4
View File
@@ -16,6 +16,10 @@ namespace BaseGames.AI
return this;
}
/// <summary>
/// 取一个状态,不存在则新建(宽松)。**只用于给别人已声明的态挂转换**。
/// 要声明一个态的行为(OnEnter/Tick/OnExit)请用 DeclareState()——它会挡住重名覆盖。
/// </summary>
public StateBuilder State(string name)
{
if (!_states.TryGetValue(name, out var s))