Created
July 16, 2015 20:00
-
-
Save sonic2kk/533f492fa05557d2e2a5 to your computer and use it in GitHub Desktop.
Simple function for rectangle/mouse collision
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function rectmouse_colliding(mouse_x, mouse_y, x, y, width, height) | |
return mouse_x > x and mouse_y < x + width and mouse_y > y and mouse_y < y + height | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment