1
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):指向右侧的箭头...

但是我找不到旋转它的方法!我怎样才能?因为我希望它下降。

4

1 回答 1

3

尽管可以旋转SpriteImage ,但不能旋转区域

    //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);
于 2015-09-30T16:24:50.077 回答