private void drawUI() { if (game.getGameState() == Game.GameState.START) { if (!infoLabel.isVisible()) infoLabel.setVisible(true); } else if (game.getGameState() == Game.GameState.RUNNING) { if (infoLabel.isVisible()) infoLabel.setVisible(false); } }
@Override public void preUIrender(float delta) { if (game.getGameMode() == GameMode.NORMAL_TIME_LIMIT) { gameTimeLabel.setText(Tools.formatNumber(game.getGameTimeRemaining(), 2, 2)); } else if (game.getGameMode() == GameMode.NORMAL_CONTINUOUS) { gameTimeLabel.setText(Tools.formatNumber(game.getGameTimeElapsed(), 2, 2)); } game.render(batch); drawUI(); }
@Override public void render(float delta) { super.render(delta); if (game.getGameState() == Game.GameState.END) reaktio.setScreen(new ScoreScreen(reaktio, game, skin)); }