MotionController class

A class the controls the playback of motions. To play back an motion it is passed to the MotionController's run method. The MotionController itself is typically a property of a Node and powered by the SpriteBox.

Constructors

MotionController()
Creates a new MotionController. However, for most uses a reference to an MotionController is acquired through the Node.motions property.

Properties

hashCode int
The hash code for this object.
no setterinherited
paused bool
Set to true to pause the MotionController. No of the actions associated with the controller will run while it's paused.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run(Motion motion, {Object? tag}) → void
Runs an motion, can optionally be passed a tag. The tag can be used to reference the motion or a set of motions with the same tag.
step(double dt) → void
Steps the motion forward by the specified time, typically there is no need to directly call this method.
stop(Motion motion) → void
Stops an Motion and removes it from the controller.
stopAll() → void
Stops all motions currently being run by the controller and removes them.
stopWithTag(Object tag) → void
Stops all motions with the specified tag and removes them from the controller.
toString() String
A string representation of this object.
inherited

Operators

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