Created
August 30, 2016 14:41
-
-
Save vlat456/a118b586d0db4f883d2e699771c58b26 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 update() { | |
prevX = getX(); | |
cleanup(); | |
wrap(playScreen.getViewport()); | |
this.setPosition(b2body.getPosition().x - getWidth()/2f, | |
b2body.getPosition().y - getHeight()/2f); | |
this.setRotation((float)Math.toDegrees(b2body.getAngle())); | |
light.setPosition(b2body.getPosition().x,b2body.getPosition().y); | |
deltaX = prevX - getX(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment