Skip to content

Instantly share code, notes, and snippets.

@codeforfun-jp
Created June 8, 2021 00:43
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/9e3fae7bfab1abca53fa521820d05b9c to your computer and use it in GitHub Desktop.
Save codeforfun-jp/9e3fae7bfab1abca53fa521820d05b9c to your computer and use it in GitHub Desktop.
CTB 5-5
orange.setY(orangeY);
// Black
blackX -= 16;
if (blackX < 0) {
blackX = screenWidth + 10;
blackY = (float)Math.floor(Math.random() * (frameHeight - black.getHeight()));
}
black.setX(blackX);
black.setY(blackY);
// Box
if (action_flg) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment