forked from Jibo-Revival-Group/JiboOs
11 lines
492 B
JavaScript
11 lines
492 B
JavaScript
/**
|
|
* @class SucceedOnEvent
|
|
* @extends jibo.bt.Decorator
|
|
* @memberof jibo.bt.decorators
|
|
* @description
|
|
* Succeeds the behavior it's decorating when an event is emitter from a behavior tree's
|
|
* global `emitter`.
|
|
* @param {Object} options See {@link jibo.bt.Decorator|Decorator} for all options.
|
|
* @param {String} options.eventName - The name of the event to listen for.
|
|
* @param {Function} options.onEvent - Called when the event is fired. Any payload with the event is passed in.
|
|
*/ |