Created
February 8, 2017 20:53
-
-
Save eaglgenes101/31ffcb3654205d9df27d9abe2eed8411 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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