The events dispatched on an actor, by name. Actors, scenes and the world get typed listeners for them.
Add your own events to it with a declare module 'dacha' block.
declare module 'dacha'
export const Damaged = 'Damaged';export type DamagedEvent = ActorEvent<{ amount: number }>;declare module 'dacha' { export interface ActorEventMap { [Damaged]: DamagedEvent; }} Copy
export const Damaged = 'Damaged';export type DamagedEvent = ActorEvent<{ amount: number }>;declare module 'dacha' { export interface ActorEventMap { [Damaged]: DamagedEvent; }}
Events
The events dispatched on an actor, by name. Actors, scenes and the world get typed listeners for them.
Add your own events to it with a
declare module 'dacha'block.Example
See
Events