protected TextureAtlas atlas = Assets.manager.get(Constants.ATLAS_PATH, TextureAtlas.class);
AtlasRegion region = interfaceAtlas.findRegion("arrow");
我加载了这样的图像 ( http://marinedealerconference.com/wp-content/uploads/2015/07/right.png ):一个指向右的箭头...
但是我找不到旋转它的方法! 我怎么能够?因为我希望它下降。
最佳答案
//sprite:
public void rotate(float degrees)
//image - remember to set origin to the center here!
public void rotateBy(float amountInDegrees)
您可以“告诉”SpriteBatch 旋转区域来绘制它,而不是旋转区域本身:
batch.draw(region, x, y, originX, originY, width, height, scaleX, scaleY, rotation);
关于java - 旋转图集区域 Libgdx,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32870559/