Scheduler Systems
Scheduler Systems
Systems run through Scheduler.addSystem(stage, system, order?).
System Contract
const system = {
id: 'example.system',
stage: 'Update',
order: 100,
reads: [],
writes: [],
runIf(world) {
return true
},
execute(ctx) {}
}
Context
execute(ctx) receives:
worlddeltaTimecommandseventsresources
Lifecycle Control
run()starts stepping behaviorpause()/resume()gate steppingshutdown()runs shutdown stage and stops scheduler
Utility Types
Profilerfor runtime timingsSeededRngfor deterministic randomnessDeterminismValidatorfor risk checks