Minor change
Always return when the gameOverTimer or newGameTmer is > 0 Move variables
This commit is contained in:
parent
a8e4d2526e
commit
d33435bf42
@ -29,6 +29,10 @@ public class PlayState extends LevelState {
|
||||
|
||||
private TextureRegion lifeSprite;
|
||||
|
||||
public Random random;
|
||||
|
||||
private long sirenId;
|
||||
|
||||
private int pelletCount;
|
||||
private int pelletEatenCount;
|
||||
private int score;
|
||||
@ -36,8 +40,6 @@ public class PlayState extends LevelState {
|
||||
private int round;
|
||||
private boolean paused = false;
|
||||
|
||||
private long sirenId;
|
||||
|
||||
private float readyTimer;
|
||||
private float gameOverTimer;
|
||||
private float newGameTimer;
|
||||
@ -46,8 +48,6 @@ public class PlayState extends LevelState {
|
||||
|
||||
private boolean pacmanCaught;
|
||||
|
||||
public Random random;
|
||||
|
||||
public Pacman pacman;
|
||||
public Ghost[] ghosts;
|
||||
|
||||
@ -118,9 +118,8 @@ public class PlayState extends LevelState {
|
||||
gameOverTimer -= dt;
|
||||
if (gameOverTimer <= 0) {
|
||||
newGame();
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (readyTimer > 0) {
|
||||
@ -136,9 +135,8 @@ public class PlayState extends LevelState {
|
||||
newGameTimer -= dt;
|
||||
if (newGameTimer <= 0) {
|
||||
setupGame();
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (frightTimer > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user