pub trait System {
// Required method
fn update(
&mut self,
world: &mut World,
queue: &EventQueue,
emitter: &mut EventEmitter,
dt: f32,
);
}
Expand description
Trait that must be implemented by all systems in the Simulation
.
Required Methods§
Sourcefn update(
&mut self,
world: &mut World,
queue: &EventQueue,
emitter: &mut EventEmitter,
dt: f32,
)
fn update( &mut self, world: &mut World, queue: &EventQueue, emitter: &mut EventEmitter, dt: f32, )
This method is called each frame, giving the System
access to the World
, EventQueue
,
and EventEmitter
. dt
is the time in milliseconds since the last update.