MCPcopy Index your code
hub / github.com/Calamari/BehaviorTree.js / step

Method step

src/BehaviorTree.js:28–43  ·  view source on GitHub ↗
({ introspector } = {})

Source from the content-addressed store, hash-verified

26 }
27
28 step({ introspector } = {}) {
29 const indexes = this.lastResult && typeof this.lastResult === 'object' ? this.lastResult : []
30 const rerun = this.lastResult === RUNNING || indexes.length > 0
31 if (introspector) {
32 introspector.start(this)
33 }
34 this.lastResult = registryLookUp(this.tree).run(this.blackboard, {
35 indexes,
36 introspector,
37 rerun,
38 registryLookUp
39 })
40 if (introspector) {
41 introspector.end()
42 }
43 }
44
45 static register(name, node) {
46 registry[name] = typeof node === 'function' ? new Task({ name, run: node }) : node

Callers 4

benchmark.jsFile · 0.80

Calls 4

registryLookUpFunction · 0.85
endMethod · 0.80
startMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected