SpriteAnimationData.sequenced constructor
SpriteAnimationData.sequenced({})
Works just like SpriteAnimationData.variable but uses the same
stepTime
for all frames.
Implementation
factory SpriteAnimationData.sequenced({
required int amount,
required double stepTime,
required Vector2 textureSize,
int? amountPerRow,
Vector2? texturePosition,
bool loop = true,
}) {
return SpriteAnimationData.variable(
amount: amount,
amountPerRow: amountPerRow,
texturePosition: texturePosition,
textureSize: textureSize,
loop: loop,
stepTimes: List.filled(amount, stepTime),
);
}