Java LibGDX多克隆病毒与多克隆病毒区域

Java LibGDX多克隆病毒与多克隆病毒区域,java,libgdx,2d,polygon,spritebatch,Java,Libgdx,2d,Polygon,Spritebatch,我可以使用PolygonSpriteBatch打印多边形,即: Pixmap pixmap = new Pixmap(1, 1, Pixmap.Format.RGBA8888); pixmap.setColor(0x00CC00FF); // DE is red, AD is green and BE is blue. pixmap.fill(); Texture texture = new Texture(pixmap); TextureRegion textureRegion =

我可以使用PolygonSpriteBatch打印多边形,即:

Pixmap pixmap = new Pixmap(1, 1, Pixmap.Format.RGBA8888);
pixmap.setColor(0x00CC00FF);     // DE is red, AD is green and BE is blue.
pixmap.fill();

Texture texture = new Texture(pixmap);
TextureRegion textureRegion = new TextureRegion(texture);
//textureRegion.flip(false, true);     //doesn't do anything =(

PolygonRegion polygonRegion = new PolygonRegion(textureRegion, polygonVertices, 
new short[] { 0, 1, 2, 0, 2, 3});    //triangle to fill in polygon

PolygonSprite polygonSprite = new PolygonSprite(polygonRegion);

PolygonSpriteBatch polygonSpriteBatch = new PolygonSpriteBatch();
我应该使用:

polygonSprite.draw(polySpriteBatch);

上面两个都画了一个多边形,但我应该用哪个呢

还有,如何翻转它们的y轴,以便从左上角而不是左下角绘制

这件事困扰了我好几个小时了,泰姆需要任何帮助

polygonSpriteBatch.draw(polygonRegion, 0, 0);