[Fix] Fix Smile Pause
This commit is contained in:
@@ -130,7 +130,7 @@ namespace Minesweeper.Presentation.Presenters
|
||||
|
||||
private void OnPauseChanged(bool isPaused)
|
||||
{
|
||||
if (isPaused && gameStateService.Current == GameState.Playing)
|
||||
if (isPaused && CanPause(gameStateService.Current))
|
||||
{
|
||||
pauseView.Show();
|
||||
}
|
||||
@@ -189,5 +189,10 @@ namespace Minesweeper.Presentation.Presenters
|
||||
{
|
||||
commandDispatcher.Dispatch(new PauseCommand());
|
||||
}
|
||||
|
||||
private static bool CanPause(GameState state)
|
||||
{
|
||||
return state == GameState.Preparing || state == GameState.Playing;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user