|
|
@ -69,9 +69,11 @@ class LaunchedBallController extends BallController
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
void lost() {
|
|
|
|
void lost() {
|
|
|
|
super.lost();
|
|
|
|
super.lost();
|
|
|
|
|
|
|
|
|
|
|
|
final bloc = gameRef.read<GameBloc>()..add(const BallLost());
|
|
|
|
final bloc = gameRef.read<GameBloc>()..add(const BallLost());
|
|
|
|
final shouldBallRespwan = !bloc.state.isLastBall && !bloc.state.isGameOver;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TODO(alestiago): Consider the use of onNewState instead.
|
|
|
|
|
|
|
|
final shouldBallRespwan = !bloc.state.isLastBall && !bloc.state.isGameOver;
|
|
|
|
if (shouldBallRespwan) gameRef.spawnBall();
|
|
|
|
if (shouldBallRespwan) gameRef.spawnBall();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|