Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CTB 4-9
public void changePos() {
if (action_flg) {
boxY -= 20;
} else {
boxY += 20;
}
if (boxY < 0) boxY = 0;
if (boxY > frameHeight - boxSize) boxY = frameHeight - boxSize;
box.setY(boxY);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment