|
|
@ -26,7 +26,6 @@ class PinballGame extends Forge2DGame with FlameBloc, KeyboardEvents {
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Future<void> onLoad() async {
|
|
|
|
Future<void> onLoad() async {
|
|
|
|
spawnBall();
|
|
|
|
|
|
|
|
addContactCallback(BallScorePointsCallback());
|
|
|
|
addContactCallback(BallScorePointsCallback());
|
|
|
|
|
|
|
|
|
|
|
|
await add(BottomWall(this));
|
|
|
|
await add(BottomWall(this));
|
|
|
@ -123,4 +122,10 @@ class PinballGame extends Forge2DGame with FlameBloc, KeyboardEvents {
|
|
|
|
|
|
|
|
|
|
|
|
return KeyEventResult.handled;
|
|
|
|
return KeyEventResult.handled;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
|
|
|
void onAttach() {
|
|
|
|
|
|
|
|
super.onAttach();
|
|
|
|
|
|
|
|
spawnBall();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|