12 lines
267 B
Dart
12 lines
267 B
Dart
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;
|
|
}
|
|
}
|