MCPcopy Create free account
hub / github.com/Calamari/BehaviorTree.js / run

Method run

src/Node.js:12–22  ·  view source on GitHub ↗
(blackboard, { introspector, rerun = false, registryLookUp = (x) => x, ...config } = {})

Source from the content-addressed store, hash-verified

10 }
11
12 run(blackboard, { introspector, rerun = false, registryLookUp = (x) => x, ...config } = {}) {
13 if (!rerun) this.blueprint.start(blackboard)
14 const result = this.blueprint.run(blackboard, { ...config, rerun, registryLookUp })
15 if (result !== RUNNING) {
16 this.blueprint.end(blackboard)
17 }
18 if (introspector) {
19 introspector.push(this, result, blackboard)
20 }
21 return result
22 }
23
24 get name() {
25 return this._name || this.blueprint.name

Callers 11

benchmark.jsFile · 0.45
Sequence.spec.jsFile · 0.45
Selector.spec.jsFile · 0.45
Random.spec.jsFile · 0.45
stepMethod · 0.45
Decorator.spec.jsFile · 0.45

Calls 3

endMethod · 0.80
pushMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected