: 我目前正在使用动画来检索我的可渲染内容。 Animation.getKeyFrame()返回TextureRegion。到目前为止,我一直在游戏中使用盒子。 但是,我想使用PolygonRegion。据我了解,这意味着每次getKeyFrame()时我都必须创建一个新的PolygonRegion。有没有从动画中获取PolygonRegion的便宜方法。或者它足够便宜,不会造成任何渲染问题。
//per render()
textureRegion = animation.getKeyFrame(stateTime, true);
PolygonRegion polygonRegion = new PolygonRegion(textureRegion, regionVertices, new short[] {
0, 1, 2,
0, 2, 3
});