【发布时间】:2015-11-03 12:07:50
【问题描述】:
我有没有按行和列管理的精灵表。但我有精灵表中每个精灵的像素坐标、高度和宽度。据我所知,我应该能够通过
获得一张特定的图像 spaceshipTexture = new BitmapTextureAtlas(getTextureManager(),1024,512,TextureOptions.BILINEAR_PREMULTIPLYALPHA);
playerTextureRegion= BitmapTextureAtlasTextureRegionFactory.createFromAsset(spaceshipTexture,
this, "spaceshipsheet.png",0,119);
这里我提供了精灵的 x 坐标和 y 坐标作为 createFromAsset 函数中的最后两个参数。它不应该返回位于精灵表中该坐标中的特定图像吗?相反,它是把整个精灵还给我。如果我没有正确获得该功能,那么请解释一下最后两个参数是什么意思?我怎样才能得到一个特定的精灵?帮助我,我是 andEngine 的新手。
【问题讨论】: