Created
July 6, 2012 14:21
-
-
Save panmari/3060436 to your computer and use it in GitHub Desktop.
setPixelLocation buggy?
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 act() { | |
xVelocity += FACTOR*gg.getXSlope(); | |
yVelocity += FACTOR*gg.getYSlope(); | |
xPos += xVelocity; | |
yPos += yVelocity; | |
setPixelLocation(new Point(Math.round(xPos), Math.round(yPos))); | |
L.d(isInGrid() + " " + getLocation()); | |
if (!isInGrid()) | |
gg.gameOver(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment