开发者

Andengine fo rAndroid

开发者 https://www.devze.com 2023-02-26 09:33 出处:网络
I am new to use Andengine.. i getting file not found exception error when i am trying with following code.

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

精彩评论

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

关注公众号