AiContext
Defined in: ai/fsm/AiContext.ts:26
Properties
Section titled “Properties”blackboard
Section titled “blackboard”
readonlyblackboard:Blackboard
Defined in: ai/fsm/AiContext.ts:35
This agent’s blackboard — the AI data plane.
commands
Section titled “commands”
readonlycommands:CommandsInstance
Defined in: ai/fsm/AiContext.ts:39
Deferred structural ops (spawn / despawn), safe mid-iteration.
readonlydt:number
Defined in: ai/fsm/AiContext.ts:30
Frame delta in seconds.
entity
Section titled “entity”
readonlyentity:number
Defined in: ai/fsm/AiContext.ts:28
The agent entity this action/condition runs for.
readonlyinput:InputState
Defined in: ai/fsm/AiContext.ts:33
Runtime input — the same state defineBehavior reads. A leaf that cannot
see the keyboard is a leaf no game logic can be written in.
readonlyworld:World
Defined in: ai/fsm/AiContext.ts:37
The world, for cross-entity access.
Methods
Section titled “Methods”get<
C>(component):ComponentData<C>
Defined in: ai/fsm/AiContext.ts:41
Read another component on THIS entity.
Type Parameters
Section titled “Type Parameters”C extends AnyComponentDef
Parameters
Section titled “Parameters”component
Section titled “component”C
Returns
Section titled “Returns”has(
component):boolean
Defined in: ai/fsm/AiContext.ts:45
Whether THIS entity has component.
Parameters
Section titled “Parameters”component
Section titled “component”Returns
Section titled “Returns”boolean
set<
C>(component,data):void
Defined in: ai/fsm/AiContext.ts:43
Write another component on THIS entity.
Type Parameters
Section titled “Type Parameters”C extends AnyComponentDef
Parameters
Section titled “Parameters”component
Section titled “component”C
Returns
Section titled “Returns”void