Skip to content

Instantly share code, notes, and snippets.

@adventureloop
Created August 23, 2012 13:38
Show Gist options
  • Save adventureloop/3436682 to your computer and use it in GitHub Desktop.
Save adventureloop/3436682 to your computer and use it in GitHub Desktop.
Collision Detection
public boolean collidesWithPoint(int x,int y)
{
if(x < this.x || x > this.x + width)
return false;
if(y < this.y || y > this.y + height)
return false;
return true;
}
@Gallefray
Copy link

how do I convert the variables?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment