/** * @callback jibo.bt.decorators.SucceedOnCondition~SucceedOnConditionConditional * @returns {Boolean} `true` to succeed the decorated behavior. `false` otherwise. */ /** * @class SucceedOnCondition * @extends jibo.bt.Decorator * @memberof jibo.bt.decorators * @description * Explicitly interrupts the behavior it's decorating and returns Status.SUCCEEDED if the * conditional evaluates to `true`. * @param {Object} options See {@link jibo.bt.Decorator|Decorator} for all options. * @param {Function} [options.init] Function called at the start of this behavior. Used to initialize any * variables or data. * @param {jibo.bt.decorators.SucceedOnCondition~SucceedOnConditionConditional} options.conditional Function called every frame. Return `true` * to force behavior to succeed. */