Skip to content

TriggerTrait

const TriggerTrait: Trait<{ crossings: number; inside: boolean; radius: number; }>

Defined in: packages/engine/src/gameplay/behaviours/traits.ts:50

inside while a hero stands within radius. crossings counts every edge the step has seen, so the Trigger component fires each one even when a frame ran several steps: they alternate from outside, so the crossing that makes the count odd is an entry and the one that makes it even an exit.