FunctionSystem class

A System implemented with callbacks. Useful for one-off behaviour or prototypes where a full subclass would be overkill.

Inheritance

Constructors

FunctionSystem(void update(World world, Duration dt), {Option<void Function(World world)> init = const None(), Option<void Function(World world)> dispose = const None()})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose(World world) → void
Called when the system is removed or the world is disposed.
override
init(World world) → void
Called once when the system is registered with a world.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
update(World world, Duration dt) → void
Called from World.update (or once from the startup phase). dt is the delta supplied to update.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited