/** * @class BehaviorTree * @extends EventEmitter * @memberof jibo.bt * @description Object for controlling the playback of the behavior tree. * * @param {jibo.bt.Behavior} root The root behavior of the tree. * @param {jibo.bt.Blackboard} blackboard Reference to the global Blackboard instance. * @param {Object} notepad Reference to a temporary object to use. * @param {Object} result Reference to the tree's result. * @param {jibo.bt.BehaviorEmitter} emitter Reference to the behavior's emitter. */ /** * Get the current status of the behavior tree * @name jibo.bt.BehaviorTree#currentStatus * @type {jibo.bt.Status} * @readOnly */ /** * Start the behavior tree. * @method jibo.bt.BehaviorTree#start * @return {Boolean} Status result */ /** * When behavior tree starts * @event jibo.bt.BehaviorTree#start */ /** * Stop the behavior tree. * @method jibo.bt.BehaviorTree#stop * @return {Promise} A promise that resolves after any asynchronous cleanup has been performed. */ /** * When behavior tree stops * @event jibo.bt.BehaviorTree#stop */ /** * Pause the behavior tree. * @private * @method jibo.bt.BehaviorTree#pause */ /** * When behavior tree pauses * @event jibo.bt.BehaviorTree#pause */ /** * Resume the behavior tree. * @private * @method jibo.bt.BehaviorTree#pause */ /** * When behavior tree resumes * @event jibo.bt.BehaviorTree#unpause */ /** * Called every frame. * @method jibo.bt.BehaviorTree#update * @returns {jibo.bt.Status} The current status of this behavior. */ /** * Destroy and don't use after this * @method jibo.bt.BehaviorTree#destroy */ /** * When behavior tree is destroyed * @event jibo.bt.BehaviorTree#destroy */ /** * Stop and destroy, don't use after this * @method jibo.bt.BehaviorTree#stopAndDestroy * @return {Promise} A promise that resolves after any asynchronous cleanup has been performed. */