I want to set my stage scene, but I do not know how to do it! I read a lot about it, but I can't do it. I start with Andengine, and it’s hard to find the exact information for my problem, everything is subjective.
Well, I implemented a screensaver in the scene and downloaded all the resources and scenes. (Https://sites.google.com/site/matimdevelopment/splash-screen---easy-way)
Then, I have to set the Background for my Scene menu, I think I need a TextureRegion and BitmapTextureAtlas to create each backgroud. I'm doing it:
Declared textures:
private TextureRegion menuBgTexture;
private BitmapTextureAtlas menuBackgroundTexture;
Load resources and load scenes (they are called onPopulateScene when Splash ends)
public void loadResources()
{
menuBackgroundTexture = new BitmapTextureAtlas(null, 480, 320, TextureOptions.DEFAULT);
menuBgTexture = BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.menuBackgroundTexture, this, "menubg.png", 0, 0);
mEngine.getTextureManager().loadTexture(this.menuBackgroundTexture);
}
private void loadScenes()
{
menuScene = new Scene();
final float centerX = (CAMERA_WIDTH - menuBgTexture.getWidth()) / 2;
final float centerY = (CAMERA_HEIGHT - menuBgTexture.getHeight()) / 2;
SpriteBackground bg = new SpriteBackground(new Sprite(centerX, centerY, menuBgTexture));
menuScene.setBackground(bg);
optionsScene = new Scene();
gameScene = new Scene();
pauseScene = new Scene();
gameOverScene = new Scene();
}
load , loadScenes, : SpriteBackground bg = SpriteBackground ( (centerX, centerY, menuBgTexture));
, (ISpriteVertexBufferObject), , ?