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() {
|
||||||
holder.enabled = false;
|
if (!gameOverDone) {
|
||||||
pauseMenu.show(true);
|
holder.enabled = false;
|
||||||
if (Klooni.soundsEnabled())
|
pauseMenu.show(true);
|
||||||
gameOverSound.play();
|
if (Klooni.soundsEnabled())
|
||||||
|
gameOverSound.play();
|
||||||
|
|
||||||
|
gameOverDone = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//endregion
|
//endregion
|
||||||
|
|
Loading…
Reference in a new issue