Make score grow to the left instead of right
Draw high score heading
This commit is contained in:
parent
5c227e53d1
commit
0d69521986
@ -256,9 +256,18 @@ public class PlayState extends LevelState {
|
||||
|
||||
@Override
|
||||
public void render() {
|
||||
// Draw score
|
||||
|
||||
game.fontRenderer.setColor(Color.WHITE);
|
||||
game.fontRenderer.draw(game.batch, "" + score, 5 * 8, 34 * 8);
|
||||
game.fontRenderer.draw(game.batch, "1up", 3 * 8, 35 * 8);
|
||||
|
||||
// Draw score
|
||||
// Determine x position based on score size.
|
||||
int scoreTileX = 5 - (score > 0 ? (int) Math.log10(score) - 1 : 0);
|
||||
game.fontRenderer.draw(game.batch, score > 0 ? "" + score : "00", scoreTileX * 8, 34 * 8);
|
||||
|
||||
// Draw high score
|
||||
game.fontRenderer.draw(game.batch, "high score", 9 * 8, 35 * 8);
|
||||
game.fontRenderer.draw(game.batch, "10000", 12 * 8, 34 * 8);
|
||||
|
||||
// Draw remaining lives
|
||||
for (int i = 0; i < lives; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user