Skip to content

Instantly share code, notes, and snippets.

@codeforfun-jp
Created June 8, 2021 01:41
Show Gist options
  • Save codeforfun-jp/91e657d3bb28d3c0103c9945d2013abb to your computer and use it in GitHub Desktop.
Save codeforfun-jp/91e657d3bb28d3c0103c9945d2013abb to your computer and use it in GitHub Desktop.
CTB 6-6
// Pink
float pinkCenterX = pinkX + pink.getWidth() / 2;
float pinkCenterY = pinkY + pink.getHeight() / 2;
if (0 <= pinkCenterX && pinkCenterX <= boxSize &&
boxY <= pinkCenterY && pinkCenterY <= boxY + boxSize) {
pinkX = -10.0f;
score += 30;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment