forked from Jibo-Revival-Group/JiboOs
11 lines
505 B
JavaScript
11 lines
505 B
JavaScript
/**
|
|
* @class StartOnEvent
|
|
* @extends jibo.bt.Decorator
|
|
* @memberof jibo.bt.decorators
|
|
* @description
|
|
* Prevents the behavior it's decorating from starting until 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.
|
|
*/ |