SpriteAnimation constructor
Cuts the image cached at asset into size frames and plays them.
Implementation
factory SpriteAnimation(
String asset,
Vector2 size, {
int? row,
int? start,
int? end,
required double fps,
bool? loop,
}) {
final region = SpriteRegion(asset, size, row: row, start: start, end: end);
_checkWhole(region, row);
return SpriteAnimation.of(region, fps: fps, loop: loop);
}