Appearance
twine / OnOptions
Interface: OnOptions โ
Defined in: twine/src/core/events/types.ts:5
How a handler is polled.
Properties โ
every? โ
optionalevery?:number
Defined in: twine/src/core/events/types.ts:19
Check the detector every every ticks. Defaults to the module's tickEvery.
This is the main cost setting: the detector runs at this rate while the module's area is active.
once? โ
optionalonce?:boolean
Defined in: twine/src/core/events/types.ts:11
Fire once per arming instead of every tick the condition holds. Default true.
The latch stays set until rearmEvents. Set false for bodies meant to repeat.
own? โ
optionalown?:string|boolean
Defined in: twine/src/core/events/types.ts:29
Put the body in its own private function instead of inlining it. Useful for long bodies.
true names it after the handler key; an unkeyed handler passes the name as a string.
phase? โ
optionalphase?:number
Defined in: twine/src/core/events/types.ts:22
Offset within the every period, to spread same-period handlers apart.