How to locate scene over the hud Andengine

454 views Asked by At

Can anybody help me with some solution or example? Problem in this: I have a scene and attached hud, i want to locate scene over the hud.

I think i want to dig at zindex path or what?

Thanks, Sorry for my eng :/

PS.Like a dark overlay

2

There are 2 answers

0
playmaker420 On BEST ANSWER
private void createHUD() {
        gameHUD = new HUD();

        scoreText = new Text(70, 420, resourcesManager.fontgame,"Score: 0123456789", new TextOptions(HorizontalAlign.LEFT),vbom);
        //scoreText.setColor(android.graphics.Color.rgb(253, 193, 7));
        scoreText.setColor(Color.WHITE);
        scoreText.setAnchorCenter(0, 0);
        scoreText.setText("Score: 0");

        heart1 = new Sprite(760, 460, resourcesManager.heart_region, vbom);
        heart2 = new Sprite(710, 460, resourcesManager.heart_region, vbom);
        heart3 = new Sprite(660, 460, resourcesManager.heart_region, vbom);

        gameHUD.attachChild(scoreText);
        gameHUD.attachChild(heart1);
        gameHUD.attachChild(heart2);
        gameHUD.attachChild(heart3);
        camera.setHUD(gameHUD);

    }
0
Rama On

You can add scene to hud layer which having any rectangle entity as child. i think it may work.