Skip to content

Instantly share code, notes, and snippets.

@eaglgenes101
Created February 8, 2017 20:53
Show Gist options
  • Save eaglgenes101/31ffcb3654205d9df27d9abe2eed8411 to your computer and use it in GitHub Desktop.
Save eaglgenes101/31ffcb3654205d9df27d9abe2eed8411 to your computer and use it in GitHub Desktop.
public void draw(Batch batch, float parentAlpha)
{
//debugDrawer is an instance of shapeRenderer, and is already initialized by this point
debugDrawer.begin();
debugDrawer.polygon(collisionBox.getTransformedVertices());
sprite.setOriginCenter();
sprite.setFlip(facing < 0, false);
sprite.setRotation(angle);
sprite.setPosition(getX(), getY());
sprite.draw(batch, parentAlpha);
drawDebug(debugDrawer);
debugDrawer.end();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment