문제

­I'm starting to use AndEngine in my app. I've used an xml to define the base style of the app. I've defined a scene in which I'll have some draggable sprites.

I've imported correctly the xml but the scene appears on top of that with a black background that hides the xml graphics. I need to set the scene with transparent background.

How can i do that?

도움이 되었습니까?

해결책

Actually you can do that.

It was at least working some time ago with AndEngine running on top of a Camera preview.

It has really been a while since I did this and I didn't keep it up to date, but this class should be of interest for you: http://code.google.com/p/andengineaugmentedrealityextension/source/browse/src/org/anddev/andengine/extension/augmentedreality/BaseAugmentedRealityGameActivity.java

다른 팁

The default background of the scene is black. you can't change it.

It can change . Use this code.

 @Override
    public Scene onLoadScene() {
            this.mEngine.registerUpdateHandler(new FPSLogger());

            final Scene scene = new Scene();
            scene.setBackground(new ColorBackground(0.09804f, 0.6274f, 0.8784f));
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top