SpriteAnimation.spriteList constructor
Creates an animation based on the parameters.
All frames have the same stepTime
.
Implementation
SpriteAnimation.spriteList(
List<Sprite> sprites, {
required double stepTime,
this.loop = true,
}) {
if (sprites.isEmpty) {
throw Exception('You must have at least one frame!');
}
frames = sprites.map((s) => SpriteAnimationFrame(s, stepTime)).toList();
}