ViewEvents beta
Class of @v12-engine/engine/ai
ts
export declare class ViewEventsThe events of a think, by kind (AiView.events): what happened in the tick of the picture that cannot be read from the state (deaths, damage, pings, the game's own)
Members
constructor
ts
constructor(
all: readonly SessionEvent[]);Constructs a new instance of the ViewEvents class
all
ts
readonly all: readonly SessionEvent[];Every event of the tick, in order
game
ts
game<T>(key: EventKey<T>): T[];What an event of the game's own said this tick (defineEvent, replicated to this player), each time it was emitted
of
ts
of<T extends SessionEvent['type']>(type: T): Extract<SessionEvent, {
type: T;
}>[];The events of one kind, typed: events.of('death'), events.of('ping')