match_magic/lib/game/sprite_loader.dart
2024-09-09 15:09:43 +03:00

16 lines
375 B
Dart

import 'package:flame/components.dart';
class SpriteLoader {
static Future<List<Sprite>> loadCrystalSprites() async {
List<Sprite> sprites = [];
for (int i = 1; i <= 7; i++) {
sprites.add(await Sprite.load('crystal$i.png'));
}
return sprites;
}
static Future<Sprite> loadMagicCubeSprite() async {
return Sprite.load('magic_cube.png');
}
}