Skip to content

Instantly share code, notes, and snippets.

@kysnm
Created April 21, 2012 08:22
Show Gist options
  • Save kysnm/2435589 to your computer and use it in GitHub Desktop.
Save kysnm/2435589 to your computer and use it in GitHub Desktop.
player.intersectScale = function(other) {
return this.x < other.x + (other.width * other.scaleX) &&
other.x < this.x + (this.width * this.scaleX) &&
this.y < other.y + (other.height * other.scaleY) &&
other.y < this.y + (this.height * this.scaleY);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment