Open Asterune
System

System

Runs a scheduled ECS callback from a script instance.

See System for the associated instance class.

Behavior

System.define creates scheduling options and a callback for a System instance. See Systems and scheduling for placement and phase rules.

Fields

define

define

System.define(options, run) returns a SystemDefinition. The source of a System instance must return that value. run(dt) receives elapsed seconds. Options are phase, after, before, sets, parallel, and interval. See Systems and scheduling for defaults, phases, placement, and failure conditions.