|
|
@ -21,10 +21,10 @@ class StartGameBloc extends Bloc<StartGameEvent, StartGameState> {
|
|
|
|
|
|
|
|
|
|
|
|
final PinballGame _game;
|
|
|
|
final PinballGame _game;
|
|
|
|
|
|
|
|
|
|
|
|
Future<void> _onSelectCharacter(
|
|
|
|
void _onSelectCharacter(
|
|
|
|
SelectCharacter event,
|
|
|
|
SelectCharacter event,
|
|
|
|
Emitter emit,
|
|
|
|
Emitter<StartGameState> emit,
|
|
|
|
) async {
|
|
|
|
) {
|
|
|
|
_game.gameFlowController.start();
|
|
|
|
_game.gameFlowController.start();
|
|
|
|
|
|
|
|
|
|
|
|
emit(
|
|
|
|
emit(
|
|
|
@ -34,10 +34,10 @@ class StartGameBloc extends Bloc<StartGameEvent, StartGameState> {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Future<void> _onHowToPlay(
|
|
|
|
void _onHowToPlay(
|
|
|
|
HowToPlay event,
|
|
|
|
HowToPlay event,
|
|
|
|
Emitter emit,
|
|
|
|
Emitter<StartGameState> emit,
|
|
|
|
) async {
|
|
|
|
) {
|
|
|
|
emit(
|
|
|
|
emit(
|
|
|
|
state.copyWith(
|
|
|
|
state.copyWith(
|
|
|
|
status: StartGameStatus.howToPlay,
|
|
|
|
status: StartGameStatus.howToPlay,
|
|
|
@ -45,10 +45,10 @@ class StartGameBloc extends Bloc<StartGameEvent, StartGameState> {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Future<void> _onPlay(
|
|
|
|
void _onPlay(
|
|
|
|
Play event,
|
|
|
|
Play event,
|
|
|
|
Emitter emit,
|
|
|
|
Emitter<StartGameState> emit,
|
|
|
|
) async {
|
|
|
|
) {
|
|
|
|
emit(
|
|
|
|
emit(
|
|
|
|
state.copyWith(
|
|
|
|
state.copyWith(
|
|
|
|
status: StartGameStatus.play,
|
|
|
|
status: StartGameStatus.play,
|
|
|
|