@Override
    public void paint(Graphics g) {

        super.paint(g);

        Graphics2D g2d = (Graphics2D) g;
        //g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
        g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

        //BACKGROUND
        g2d.drawImage(fundo, pos.x, pos.y, largura, altura, null);
        g2d.drawImage(fundo, pos.x, pos.y - altura + 1, largura, altura, this);

        //NAVE
        g2d.drawImage(nave.getTile().getSprite(), nave.getBounds().x, nave.getBounds().y, nave.getBounds().width, nave.getBounds().height, this);
        g2d.setColor(Color.red);
        if (Desenvolvedor) {
            g2d.drawRect(nave.getBounds().x, nave.getBounds().y, nave.getBounds().width, nave.getBounds().height);
            g2d.setColor(Color.BLUE);
            g2d.draw(nave.getColider().forma);
            g2d.setColor(Color.red);
            g2d.fillOval(nave.getBounds().x + nave.getBounds().width / 2 - 5, nave.getBounds().y + nave.getBounds().height / 2 - 5, 10, 10);
        }

        //BALAS
        List<Municao> municao = nave.getMunicao();
        for (Municao bala : municao) {
            g2d.drawImage(bala.getTile().getSprite(), bala.getBounds().x, bala.getBounds().y, this);
            if (Desenvolvedor) {
                g2d.setColor(Color.blue);
                g2d.drawRect(bala.getBounds().x, bala.getBounds().y, bala.getBounds().width, bala.getBounds().height);
            }
            //se a bala sair da tela, deleta ela
            if (bala.getBounds().y + bala.getBounds().height < 0) {
                bala.setDelete(true);
            }
        }

        for (Asteroide asteroide : asteroides) {
            g2d.drawImage(asteroide.getTile().getSprite(), asteroide.getBounds().x, asteroide.getBounds().y, this);

            if (asteroide.getHpBar().isAparece()) {
                g2d.drawImage(asteroide.getHpBar().getSprite(), asteroide.getBounds().x, asteroide.getBounds().y + asteroide.getBounds().height, asteroide.getHpBar().getHp(), asteroide.getHpBar().getSprite().getHeight(this), this);
                //DIMINUI O TEMPO QUE A BARRA DE VIDA APARECE NA TELA
                asteroide.getHpBar().diminuiTempo(1);
                if (asteroide.getHpBar().getTempo() == 0) {
                    asteroide.getHpBar().setAparece(false);
                    asteroide.getHpBar().setTempo(100);
                }
            }
            if (Desenvolvedor) {
                g2d.setColor(Color.BLUE);
                g2d.draw(asteroide.getColider().forma);
                g2d.setColor(Color.red);
                g2d.drawRect(asteroide.getBounds().x, asteroide.getBounds().y, asteroide.getBounds().width, asteroide.getBounds().height);
            }
            //se o meteoro passar da tela, deleta ele e a thread
            if (asteroide.getBounds().y > altura) {
                asteroide.getColider().setDelete(true);
            }
        }

        //BARRA DE HP
        g2d.drawImage(nave.getHpBar().getSprite(), 9, 10, nave.getHpBar().getSprite().getWidth(this), nave.getHpBar().getSprite().getHeight(this), this);


        g.dispose();
    }