Alter positioning on high score screens

Fix removal of preNewGame() after GameOver
This commit is contained in:
Matt Low 2020-01-16 16:53:10 +04:00
parent 0a058e3d19
commit fb6f77b72c
3 changed files with 5 additions and 5 deletions

View File

@ -43,8 +43,7 @@ public class HighScoreEntryState extends State {
game.fontRenderer.draw(game.batch, "high scores", (8 * 8) + 4, 25 * 8);
game.fontRenderer.setColor(Color.CHARTREUSE);
game.fontRenderer.draw(game.batch, "score name", (8 * 8) + 4, 23 * 8);
game.fontRenderer.draw(game.batch, "score name", (8 * 8) + 4, 22 * 8);
game.fontRenderer.setColor(Color.BLUE);
game.fontRenderer.draw(game.batch, "" + score.score, (8 * 8) + 4, 18 * 9);
@ -56,7 +55,7 @@ public class HighScoreEntryState extends State {
Score[] scores = game.highScores.getHighScores(9);
for (int i = 0; i < scores.length; i++) {
Score score = scores[i];
game.fontRenderer.draw(game.batch, String.format("%-8d%s", score.score, score.scorer), (8 * 8) + 4, (16 - i) * 9);
game.fontRenderer.draw(game.batch, String.format("%-8d%s", score.score, score.scorer), (8 * 8) + 4, (17 - i) * 9);
}
}

View File

@ -31,13 +31,13 @@ public class HighScoresState extends State {
game.fontRenderer.draw(game.batch, "high scores", (8 * 8) + 4, 25 * 8);
game.fontRenderer.setColor(Color.CHARTREUSE);
game.fontRenderer.draw(game.batch, "score name", (8 * 8) + 4, 23 * 8);
game.fontRenderer.draw(game.batch, "score name", (8 * 8) + 4, 22 * 8);
game.fontRenderer.setColor(Color.WHITE);
Score[] scores = game.highScores.getHighScores(10);
for (int i = 0; i < scores.length; i++) {
Score score = scores[i];
game.fontRenderer.draw(game.batch, String.format("%-8d%s", score.score, score.scorer), (8 * 8) + 4, (17 - i) * 9);
game.fontRenderer.draw(game.batch, String.format("%-8d%s", score.score, score.scorer), (8 * 8) + 4, (18 - i) * 9);
}
}

View File

@ -252,6 +252,7 @@ public class PlayState extends LevelState {
game.setNextState(new HighScoreEntryState(game, new Score("aaa", score)));
return null;
}
preNewGame();
return GameState.PRE_NEW_GAME;
case GHOST_CAUGHT_POINTS_WAIT:
updateBackgroundAudio();