forked from Jibo-Revival-Group/JiboOs
14 lines
978 B
JavaScript
14 lines
978 B
JavaScript
/**
|
|
* @class Subtree
|
|
* @extends jibo.bt.Behavior
|
|
* @memberof jibo.bt.behaviors
|
|
* @description Encapsulates an external subtree file (`.bt` file) into a single behavior. This behavior fails if the
|
|
* `.bt` tree fails, and succeeds if that tree succeeds.
|
|
* @param {Object} options See {@link jibo.bt.Behavior|Behavior} for all options.
|
|
* @param {String} options.behaviorPath The path to the `.bt` file this behavior encapsulates. This assumes the root
|
|
* of all `.bt` files is in `${project}/behaviors`.
|
|
* @param {Function} options.getNotepad Returns an object that will become this referenced tree's notepad. Think of this as the
|
|
* arguments to this subtree.
|
|
* @param {Function} options.onResult Called when the external tree either fails or succeeds. A result object is passed as an argument.
|
|
* This result object is populated by the external tree. Think of this as the return value.
|
|
*/ |