开发者

Andengine fo rAndroid

I am new to use Andengine..

i getting file not found exception error when i am trying with following code.

 public void onLoadResources() {
         this.mTexture = new Texture(32, 32, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
         this.mFaceTextureRegion = TextureRegionFactory.createFromAsset(this.mTexture, this, "gfx/face_box.png", 0, 0);

         this.mEngine.getTextureManager().loadTexture(this.mTe开发者_如何学Goxture);
 }

Most Probably due to this gfx/face_box.png.

How to fix this error? How can I use my own image here. Do I have to give the path of my any gallery image? or I can use any image that resides in the drawable folder.

Can any body help?


Put the image you want inside the assets/gfx/[imagename] path.

Furthermore make the size of your images so that its dividable by 2:

e.g. 16x16 or 32x32 or 128x32

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜