跳转到内容

setStateHook

此内容尚不支持你的语言。

setStateHook(def, name, hook, action, arg?, params?): FsmDefinition

Defined in: ai/fsm/fsmGraph.ts:89

Point a state hook at an action, with its input in either form: the canonical string (arg) or the action’s declared parameters. A bare name stays a bare string in the data — the shorthand most hooks use — and clearing the name clears the hook.

FsmDefinition

string

"onEnter" | "onUpdate" | "onExit"

string

string

Record<string, AiParamValue>

FsmDefinition