UNPKG

blueshell

Version:

A Behavior Tree implementation in modern Javascript

21 lines (20 loc) 843 B
import { ResultCode, BlueshellState, BaseNode, ConditionalWithResult } from '../../models'; import { Decorator } from '../Decorator'; /** * Given a conditional, have the child Node repeat handling of the event. * 1/12/16 * @author Joshua Chaitin-Pollak */ export declare class RepeatWhen<S extends BlueshellState, E> extends Decorator<S, E> { private conditional; constructor(desc: string, child: BaseNode<S, E>, conditional: ConditionalWithResult<S, E>); /** * Executes the conditional with the given state, event, and child result. * Child is repeated depending on result of conditional. * @override * @param state The state when the event occured. * @param event The event to handle. */ protected decorateResult(res: ResultCode, state: S, event: E): ResultCode; get symbol(): string; }