0

我是使用 Andengine 的新手..

当我尝试使用以下代码时,我收到文件未找到异常错误。

 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.mTexture);
 }

很可能是由于这个gfx/face_box.png
如何修复此错误?我如何在这里使用我自己的图像。我必须提供我的任何画廊图像的路径吗?drawable或者我可以使用文件夹中的任何图像。

任何身体都可以帮忙吗?

4

1 回答 1

2

将您想要的图像放在assets/gfx/[imagename]路径中。

此外,使图像的大小可以被 2 整除:

例如 16x16 或 32x32 或 128x32

于 2011-04-19T05:15:52.170 回答