From fb3e26da3584a403158ba1841322bf05875b9ec6 Mon Sep 17 00:00:00 2001 From: Matt Low Date: Sun, 5 Jan 2020 12:47:39 +0400 Subject: [PATCH] Fix lives being removed on new round --- core/src/com/me/pacman/state/PlayState.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/com/me/pacman/state/PlayState.java b/core/src/com/me/pacman/state/PlayState.java index 0acef02..083f516 100644 --- a/core/src/com/me/pacman/state/PlayState.java +++ b/core/src/com/me/pacman/state/PlayState.java @@ -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 {