Creates a TriggerSystem for the ECS world.
This system handles spatial proximity checks, cooldowns, and trigger lifecycle. It expects entities with 'trigger' and 'transform' components, and 'triggerable' entities with 'transform' components.
An ECS SystemFn
const triggerSystem = createTriggerSystem();world.addSystem(triggerSystem); Copy
const triggerSystem = createTriggerSystem();world.addSystem(triggerSystem);
Creates a TriggerSystem for the ECS world.
This system handles spatial proximity checks, cooldowns, and trigger lifecycle. It expects entities with 'trigger' and 'transform' components, and 'triggerable' entities with 'transform' components.