Skip to content

Instantly share code, notes, and snippets.

@codeforfun-jp
Created June 8, 2021 00:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codeforfun-jp/5eebec1eca500823af192ab865c41a3c to your computer and use it in GitHub Desktop.
Save codeforfun-jp/5eebec1eca500823af192ab865c41a3c to your computer and use it in GitHub Desktop.
CTB 5-6
black.setY(blackY);
// Pink
pinkX -= 20;
if (pinkX < 0) {
pinkX = screenWidth + 5000;
pinkY = (float)Math.floor(Math.random() * (frameHeight - pink.getHeight()));
}
pink.setX(pinkX);
pink.setY(pinkY);
// Box
if (action_flg) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment