Behaviour · interface
BehaviorTree
The tree, flattened. Built once; a character per agent shares it.
Explained in Agents and behaviour.
interface BehaviorTreeimport type { BehaviorTree } from '@driftengine/core';Properties
| Name | Type | Description |
|---|---|---|
kindreadonly | Uint8Array | |
childStartreadonly | Uint32Array | For a composite: where its children start in child. Length nodeCount + 1. |
childreadonly | Uint32Array | |
slotreadonly | Int32Array | For an action, condition or guard: which function in the table. |
namesreadonly | readonly string[] | |
nodeCountreadonly | number | |
actionsreadonly | readonly ((context: never) => BehaviorStatus)[] | The functions, in the order slot indexes them. |
conditionsreadonly | readonly ((context: never) => boolean)[] |