blueshell
Version:
A Behavior Tree implementation in modern Javascript
16 lines (15 loc) • 644 B
TypeScript
import { Switch } from './Switch';
import { BlueshellState, ResultCode } from '../models';
/**
* Executes the child action associated with the first matching conditional.
* Latches on that child action without re-checking the corresponding conditional until
* it returns a result other than RUNNING. Returns defaultResult if no conditionals match.
*
* 11/9/21
* @author Timothy Deignan
*/
export declare class LatchedSwitch<S extends BlueshellState, E> extends Switch<S, E> {
protected onEvent(state: S, event: E): ResultCode;
protected _afterEvent(res: ResultCode, state: S, event: E): ResultCode;
get latched(): boolean;
}