SpriteAnimationData class

Constructors

SpriteAnimationData(List<SpriteAnimationFrameData> frames, {bool loop = true})
Creates a SpriteAnimationData from the given frames and loop parameters.
SpriteAnimationData.range({required int start, required int end, required int amount, required List<double> stepTimes, required Vector2 textureSize, int? amountPerRow, Vector2? texturePosition, bool loop = true})
Specifies the range of the sprite grid.
SpriteAnimationData.sequenced({required int amount, required double stepTime, required Vector2 textureSize, int? amountPerRow, Vector2? texturePosition, bool loop = true})
Works just like SpriteAnimationData.variable but uses the same stepTime for all frames.
factory
SpriteAnimationData.variable({required int amount, required List<double> stepTimes, required Vector2 textureSize, int? amountPerRow, Vector2? texturePosition, bool loop = true})
Takes some parameters and automatically calculate and create the frames for the sprite animation data.

Properties

frames List<SpriteAnimationFrameData>
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
loop bool
final
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
toString() String
A string representation of this object.
inherited

Operators

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