stateManager.render(g);
return;
}
float xpos = x, ypos = y;
if (currentAnim != null) {
Animation anim = animations.get(currentAnim);
int w = anim.getWidth();
int h = anim.getHeight();
int whalf = w / 2;
int hhalf = h / 2;
if (centered) {
xpos = x - (whalf * scale);
ypos = y - (hhalf * scale);
}
if (angle != 0) {
g.rotate(x, y, angle);
}
anim.draw(xpos, ypos, w * scale, h * scale, color);
if (angle != 0)
g.resetTransform();
} else if (currentImage != null) {
currentImage.setAlpha(color.a);
int w = currentImage.getWidth() / 2;