16 lines
375 B
Dart
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');
|
|
}
|
|
}
|