0
我正在使用andengine開發遊戲。對於我需要創建紋理的每個精靈和textureRegion
。如何在引擎中避免更多紋理和紋理區域
Texture bgTexture;
TextureRegion bgTextureRegion;
this.bgTexture = new Texture(512, 1024,TextureOptions.BILINEAR_PREMULTIPLYALPHA);
this.bgTextureRegion = TextureRegionFactory.createFromAsset(
this.bgTexture, this, "gfx/bg.png", 0, 0);
Sprite bgSprite = new Sprite(0, 0, this.bgTextureRegion);
如果我使用scoreSprite
,lifeSprite
,等我需要重新再爲每個精靈創建一個紋理和textureRegion
&。
它增加了遊戲的加載時間。任何解決方案來解決這個問題?
嗨..我有解決方案動態加載紋理和textureRegion http://www.andengine.org/forums/tutorials/dynamically-load-all-textures-紋理區域,t4139.html – JohnRaja