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

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