Interface: LayerEvents
game/layers.LayerEvents
All types of events able to be sent or emitted from a layer's emitter.
Properties
postUpdate
• postUpdate: (diff
: number
) => void
Type declaration
▸ (diff
): void
Sent every game tick, after the update event. Intended for checking state.
Parameters
Name | Type | Description |
---|---|---|
diff | number | The delta time since last tick, in ms. |
Returns
void
Defined in
profectus/src/game/layers.tsx:70
preUpdate
• preUpdate: (diff
: number
) => void
Type declaration
▸ (diff
): void
Sent every game tick, before the update event. Intended for "generation" type actions.
Parameters
Name | Type | Description |
---|---|---|
diff | number | The delta time since last tick, in ms. |
Returns
void
Defined in
profectus/src/game/layers.tsx:60
update
• update: (diff
: number
) => void
Type declaration
▸ (diff
): void
Sent every game tick. Intended for "automation" type actions.
Parameters
Name | Type | Description |
---|---|---|
diff | number | The delta time since last tick, in ms. |
Returns
void