UNPKG

mistreevous

Version:

A library to declaratively define, build and execute behaviour trees, written in TypeScript for Node and browsers

27 lines (26 loc) 843 B
import Composite from "./Composite"; import Node from "../Node"; import { Agent } from "../../Agent"; import Attribute from "../../attributes/Attribute"; import { BehaviourTreeOptions } from "../../BehaviourTreeOptions"; /** * An ALL node. * The child nodes are executed concurrently until all child nodes move to a completed state. */ export default class All extends Composite { /** * @param attributes The node attributes. * @param options The behaviour tree options. * @param children The child nodes. */ constructor(attributes: Attribute[], options: BehaviourTreeOptions, children: Node[]); /** * Called when the node is being updated. * @param agent The agent. */ protected onUpdate(agent: Agent): void; /** * Gets the name of the node. */ getName: () => string; }