Fix lives being removed on new round
This commit is contained in:
parent
31a2657c13
commit
fb3e26da35
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user