Fix lives being removed on new round
This commit is contained in:
		| @ -144,7 +144,6 @@ public class PlayState extends LevelState { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     private void resetField() { |     private void resetField() { | ||||||
|         lives--; |  | ||||||
|         frightTimer = 0f; |         frightTimer = 0f; | ||||||
|         ghostsCaught = 0; |         ghostsCaught = 0; | ||||||
|         lastGhostCaptured = null; |         lastGhostCaptured = null; | ||||||
| @ -169,6 +168,7 @@ public class PlayState extends LevelState { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     private void newGame() { |     private void newGame() { | ||||||
|  |         lives--; | ||||||
|         initializeRound(); |         initializeRound(); | ||||||
|         resetField(); |         resetField(); | ||||||
|     } |     } | ||||||
| @ -449,6 +449,7 @@ public class PlayState extends LevelState { | |||||||
|                 pacman.update(dt); |                 pacman.update(dt); | ||||||
|                 if (pacman.deathFrame == 13) { |                 if (pacman.deathFrame == 13) { | ||||||
|                     if (lives > 0) { |                     if (lives > 0) { | ||||||
|  |                         lives--; | ||||||
|                         resetField(); |                         resetField(); | ||||||
|                         setGameState(GameState.START_ROUND_WAIT); |                         setGameState(GameState.START_ROUND_WAIT); | ||||||
|                     } else { |                     } else { | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user