[Fix] Fix Smile Pause
This commit is contained in:
@@ -75,11 +75,11 @@ namespace Minesweeper.Presentation.Presenters
|
||||
{
|
||||
commandDispatcher.Dispatch(new StartGameCommand());
|
||||
}
|
||||
else if (state == GameState.Playing && !pauseService.IsPaused)
|
||||
else if (CanPause(state) && !pauseService.IsPaused)
|
||||
{
|
||||
commandDispatcher.Dispatch(new PauseCommand());
|
||||
}
|
||||
else if (state == GameState.Playing && pauseService.IsPaused)
|
||||
else if (CanPause(state) && pauseService.IsPaused)
|
||||
{
|
||||
commandDispatcher.Dispatch(new ResumeCommand());
|
||||
}
|
||||
@@ -126,5 +126,10 @@ namespace Minesweeper.Presentation.Presenters
|
||||
|
||||
return SmileFaceState.Smile;
|
||||
}
|
||||
|
||||
private static bool CanPause(GameState state)
|
||||
{
|
||||
return state == GameState.Preparing || state == GameState.Playing;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user