mirror of https://github.com/flutter/pinball.git
parent
d77f2876a1
commit
ac0aca5f8f
After Width: | Height: | Size: 27 KiB |
@ -1,4 +1,5 @@
|
||||
export 'bloc/game_bloc.dart';
|
||||
export 'components/components.dart';
|
||||
export 'game_assets.dart';
|
||||
export 'pinball_game.dart';
|
||||
export 'view/view.dart';
|
||||
|
@ -0,0 +1,12 @@
|
||||
import 'package:pinball/game/game.dart';
|
||||
|
||||
/// Add methods to help loading and caching game assets
|
||||
extension PinballGameAssetsX on PinballGame {
|
||||
|
||||
/// Pre load the initial assets of the game
|
||||
Future<void> preLoadAssets() async {
|
||||
await Future.wait([
|
||||
images.load(Ball.spritePath),
|
||||
]);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue