mirror of https://github.com/flutter/pinball.git
Merge pull request #19 from VGVentures/feat/ball-placeholder-asset
feat: adding ball component placeholder assetpull/21/head
commit
aca7022fdb
After Width: | Height: | Size: 27 KiB |
@ -1,4 +1,5 @@
|
|||||||
export 'bloc/game_bloc.dart';
|
export 'bloc/game_bloc.dart';
|
||||||
export 'components/components.dart';
|
export 'components/components.dart';
|
||||||
|
export 'game_assets.dart';
|
||||||
export 'pinball_game.dart';
|
export 'pinball_game.dart';
|
||||||
export 'view/view.dart';
|
export 'view/view.dart';
|
||||||
|
@ -0,0 +1,11 @@
|
|||||||
|
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