/**
* Muestra la información de juego del personaje
*/
private void drawOnscreenText() {
Ship ship = spriteManager.getShip();
// Muestra la puntuación y nivel del jugador
game.font.draw(game.batch, "PUNTOS: " + ship.getScore(), 15, 20);
game.font.draw(game.batch, "NIVEL: " + levelManager.getCurrentLevel(), 130, 20);
game.batch.draw(ResourceManager.getAtlas("ship").findRegion("ship", 1), 15, 30, 20, 10);
game.font.draw(game.batch, "X " + spriteManager.getShip().getLives(), 50, 40);
game.batch.draw(ResourceManager.getTexture("bomb_score"), 15, 45);
game.font.draw(game.batch, "X " + spriteManager.getShip().getBombs(), 50, 55);
game.batch.draw(ResourceManager.getTexture("missile_score"), 15, 60);
game.font.draw(game.batch, "X " + spriteManager.getShip().getMissiles(), 50, 70);
// Muestra el escudo protector de la nave
shapeRenderer.begin(ShapeType.Line);
if (ship.getShieldTime() > 3) {
shapeRenderer.ellipse(ship.getX(), ship.getY() - Constants.SHIP_HEIGHT / 1.5f, Constants.SHIP_WIDTH + 1f, Constants.SHIP_WIDTH + 1);
shapeRenderer.ellipse(ship.getX(), ship.getY() - Constants.SHIP_HEIGHT / 2f, Constants.SHIP_WIDTH + 11, Constants.SHIP_WIDTH + 11);
shapeRenderer.ellipse(ship.getX(), ship.getY() - Constants.SHIP_HEIGHT / 2.2f, Constants.SHIP_WIDTH + 21, Constants.SHIP_WIDTH + 21);
}
else if ((ship.getShieldTime() > 2) && (ship.getShieldTime() <= 3)) {
shapeRenderer.ellipse(ship.getX(), ship.getY() - Constants.SHIP_HEIGHT / 1.5f, Constants.SHIP_WIDTH + 1, Constants.SHIP_WIDTH + 1);
shapeRenderer.ellipse(ship.getX(), ship.getY() - Constants.SHIP_HEIGHT / 2f, Constants.SHIP_WIDTH + 11, Constants.SHIP_WIDTH + 11);
}
else if ((ship.getShieldTime() > 0) && (ship.getShieldTime() <= 2)) {
shapeRenderer.ellipse(ship.getX(), ship.getY() - Constants.SHIP_HEIGHT / 1.5f, Constants.SHIP_WIDTH + 1, Constants.SHIP_WIDTH + 1);
}
shapeRenderer.end();
}