mirror of https://github.com/flutter/pinball.git
commit
5a1093d9a5
After Width: | Height: | Size: 27 KiB |
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"hosting": {
|
||||||
|
"public": "build/web",
|
||||||
|
"ignore": [
|
||||||
|
"firebase.json",
|
||||||
|
"**/.*",
|
||||||
|
"**/node_modules/**"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
@ -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