Merge pull request #17 from VGVentures/fix/ball-spawn

fix: changing ball spawning point to avoid context errors
pull/18/head
Allison Ryan 3 years ago committed by GitHub
commit d77f2876a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -18,10 +18,15 @@ class PinballGame extends Forge2DGame with FlameBloc {
@override
Future<void> onLoad() async {
spawnBall();
addContactCallback(BallScorePointsCallback());
await add(BottomWall(this));
addContactCallback(BottomWallBallContactCallback());
}
@override
void onAttach() {
super.onAttach();
spawnBall();
}
}

Loading…
Cancel
Save