LifetimeSystemOptions
Defined in: src/modules/lifetime/lifetime.ts:25
Options for makeLifetimeSystem: system name, runAfter, and an optional onExpire handler.
Type Parameters
Section titled “Type Parameters”TCtx extends LifetimeTickCtx
Properties
Section titled “Properties”
optionalname?:string
Defined in: src/modules/lifetime/lifetime.ts:26
onExpire?
Section titled “onExpire?”
optionalonExpire?: (ctx,id) =>void
Defined in: src/modules/lifetime/lifetime.ts:35
Called when an entity expires. When provided, the callback owns
cleanup — the engine does not auto-destroy. If the callback does
not call ctx.world.queueDestroy(id) (or otherwise remove the
lifetime component), the entity will re-expire on the next tick.
Exceptions thrown by the callback halt the remaining expiry loop.
Parameters
Section titled “Parameters”TCtx
Returns
Section titled “Returns”void
runAfter?
Section titled “runAfter?”
optionalrunAfter?:string[]
Defined in: src/modules/lifetime/lifetime.ts:27