Fix lives being removed on new round

This commit is contained in:
Matt Low 2020-01-05 12:47:39 +04:00
parent 31a2657c13
commit fb3e26da35

View File

@ -144,7 +144,6 @@ public class PlayState extends LevelState {
}
private void resetField() {
lives--;
frightTimer = 0f;
ghostsCaught = 0;
lastGhostCaptured = null;
@ -169,6 +168,7 @@ public class PlayState extends LevelState {
}
private void newGame() {
lives--;
initializeRound();
resetField();
}
@ -449,6 +449,7 @@ public class PlayState extends LevelState {
pacman.update(dt);
if (pacman.deathFrame == 13) {
if (lives > 0) {
lives--;
resetField();
setGameState(GameState.START_ROUND_WAIT);
} else {