Files
JiboOs/docs/bt/decorators/StartOnEvent.js
2026-03-16 13:53:01 +02:00

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.
*/