答案 0 :(得分:2)
这对我有用:
class SkewActor extends Actor {
private TextureRegion tex;
private Affine2 affine = new Affine2();
public SkewActor(TextureRegion textureRegion) {
this.tex = textureRegion;
}
@Override
public void draw(Batch batch, float parentAlpha) {
Color color = getColor();
batch.setColor(color.r, color.g, color.b, color.a * parentAlpha);
affine.setToTranslation(getX(), getY());
affine.shear(0.5f, 0); // <- modify skew here
batch.draw(tex,getWidth(), getHeight(), affine);
}
}