Allow returning to play mode after time dead
This commit is contained in:
parent
b760fe20cb
commit
e6fb6b78e4
1 changed files with 10 additions and 4 deletions
|
@ -36,6 +36,8 @@ class GameScreen implements Screen, InputProcessor {
|
||||||
// by implementing different "isGameOver" etc. logic instead using an integer?
|
// by implementing different "isGameOver" etc. logic instead using an integer?
|
||||||
private final int gameMode;
|
private final int gameMode;
|
||||||
|
|
||||||
|
private boolean gameOverDone;
|
||||||
|
|
||||||
//endregion
|
//endregion
|
||||||
|
|
||||||
//region Static members
|
//region Static members
|
||||||
|
@ -87,10 +89,14 @@ class GameScreen implements Screen, InputProcessor {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doGameOver() {
|
private void doGameOver() {
|
||||||
|
if (!gameOverDone) {
|
||||||
holder.enabled = false;
|
holder.enabled = false;
|
||||||
pauseMenu.show(true);
|
pauseMenu.show(true);
|
||||||
if (Klooni.soundsEnabled())
|
if (Klooni.soundsEnabled())
|
||||||
gameOverSound.play();
|
gameOverSound.play();
|
||||||
|
|
||||||
|
gameOverDone = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//endregion
|
//endregion
|
||||||
|
|
Loading…
Reference in a new issue