[libgdx] Delegate to the specific batch rendering methods.

This commit is contained in:
NathanSweet 2018-03-22 12:03:26 +01:00
parent ce3c04da6d
commit 409f7ed133

View File

@ -62,6 +62,14 @@ public class SkeletonRenderer {
private final Color temp6 = new Color();
public void draw (Batch batch, Skeleton skeleton) {
if (batch instanceof PolygonSpriteBatch) {
draw((PolygonSpriteBatch)batch, skeleton);
return;
} else if (batch instanceof TwoColorPolygonBatch) {
draw((TwoColorPolygonBatch)batch, skeleton);
return;
}
VertexEffect vertexEffect = this.vertexEffect;
if (vertexEffect != null) vertexEffect.begin(skeleton);