readTriggerOccupants
readTriggerOccupants(
world,trigger): readonlyEntity[]
Each entity inside trigger now, by any of its colliders: the state
its entry and exit events report, so a reader that missed an event,
past the event log’s bound or added after the entry, finds who is
inside. Answered where the trigger is simulated: on a page, a trigger
the room streams throws in development, pointing to isTouching for
her own character, and reads empty deployed. The list is refilled by
the next call: copy it to keep it.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
world |
World |
trigger |
Entity |
Returns
Section titled “Returns”readonly Entity[]
Example
Section titled “Example”for (const inside of readTriggerOccupants(world, goal)) score(inside);