match_magic/lib/game/sprite_loader.dart

12 lines
267 B
Dart
Raw Normal View History

2024-08-05 08:04:54 +00:00
import 'package:flame/components.dart';
class SpriteLoader {
static Future<List<Sprite>> loadSprites() async {
List<Sprite> sprites = [];
for (int i = 1; i <= 7; i++) {
sprites.add(await Sprite.load('crystal$i.png'));
}
return sprites;
}
}