Sequences beta
Class of @v12-engine/engine
export declare class SequencesThe sequences of a world
Members
constructor
constructor(world: World, defs: readonly SequenceDef[]);Constructs a new instance of the Sequences class
heard
heard(event: string, payload: unknown): void;An event that sequences may wait for went off. For the engine's listeners
hurry
hurry(id: number): boolean;Cuts the wait a sequence is on short, and takes it on at once: a line of dialog skipped. Whether it was waiting
listenersFor
static listenersFor(defs: readonly SequenceDef[]): ListenerDef[];Listeners for the events the sequences of a game wait for, one for each event: the world subscribes them with the game's own
resume
resume(id: number): void;Takes a sequence whose wait is over on. For the engine's timer
running
running(id: number): boolean;Whether a sequence is still running
start
start<D>(sequence: SequenceDef<D>, ...data: D extends undefined ? [] : [D]): number;Starts a sequence: its first steps run at once, up to the first that waits. Returns its id, for stop
stop
stop(id: number): boolean;Stops a sequence where it is. Whether it was running
update
update(): void;Asks the sequences waiting until something holds whether it does. The sequences system does, every tick