// TODO: Draw a game over message
// Feel free to get more creative with this screen. Perhaps you could cover the screen in enemy robots?
public void render(SpriteBatch batch) {
        viewport.apply();
        batch.setProjectionMatrix(viewport.getCamera().combined);
        batch.begin();
        // TODO: Draw a game over message
        // Feel free to get more creative with this screen. Perhaps you could cover the screen in enemy robots?
        float timeElapsed = Utils.secondsSince(startTime);
        int enemiesToShow = (int) (Constants.ENEMY_COUNT * (timeElapsed / Constants.LEVEL_END_DURATION));
        for (int i = 0; i < enemiesToShow; i++){
            Enemy enemy = enemies.get(i);
            enemy.update(0);
            enemy.render(batch);
        }
        font.draw(batch, Constants.GAME_OVER_MESSAGE, viewport.getWorldWidth() / 2, viewport.getWorldHeight() / 2.5f, 0, Align.center, false);
        batch.end();
    }
batch.setProjectionMatrix(viewport.getCamera().combined);
batch.begin();
// TODO: Draw a game over message
// Feel free to get more creative with this screen. Perhaps you could cover the screen in enemy robots?
float timeElapsed = Utils.secondsSince(startTime);
int enemiesToShow = (int) (Constants.ENEMY_COUNT * (timeElapsed / Constants.LEVEL_END_DURATION));
public void render(SpriteBatch batch) {
viewport.apply();
batch.setProjectionMatrix(viewport.getCamera().combined);
batch.begin();
// TODO: Draw a game over message
// Feel free to get more creative with this screen. Perhaps you could cover the screen in enemy robots?
float timeElapsed = Utils.secondsSince(startTime);
int enemiesToShow = (int) (Constants.ENEMY_COUNT * (timeElapsed / Constants.LEVEL_END_DURATION));
for (int i = 0; i < enemiesToShow; i++){
Enemy enemy = enemies.get(i);
enemy.update(0);
enemy.render(batch);
}
font.draw(batch, Constants.GAME_OVER_MESSAGE, viewport.getWorldWidth() / 2, viewport.getWorldHeight() / 2.5f, 0, Align.center, false);
batch.end();
}
public void render(SpriteBatch batch) {
viewport.apply();
batch.setProjectionMatrix(viewport.getCamera().combined);
batch.begin();
// TODO: Draw a game over message
// Feel free to get more creative with this screen. Perhaps you could cover the screen in enemy robots?
float timeElapsed = Utils.secondsSince(startTime);
int enemiesToShow = (int) (Constants.ENEMY_COUNT * (timeElapsed / Constants.LEVEL_END_DURATION));
for (int i = 0; i < enemiesToShow; i++){
Enemy enemy = enemies.get(i);
enemy.update(0);
enemy.render(batch);
}
font.draw(batch, Constants.GAME_OVER_MESSAGE, viewport.getWorldWidth() / 2, viewport.getWorldHeight() / 2.5f, 0, Align.center, false);
batch.end();
}