有人可以帮我解决一些问题吗? 这个问题: 我有一个场景和附加的hud,我想在hud上找到场景。
我想我想挖掘zindex路径或者什么?
谢谢,抱歉我的英文:/
PS.Like一个黑暗的叠加
答案 0 :(得分:0)
您可以将场景添加到具有任何矩形实体作为子项的hud图层。我认为它可能有用。
答案 1 :(得分:0)
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);
}