Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (var i = 1 ; i < collidables.length ; i++) {
- if (y < collidables[i].y + collidables[i].z &&
- x < collidables[i].x + collidables[i].z &&
- x + z > collidables[i].x &&
- y + z > collidables[i].y) {
- // Handle collision
- }
- }
Add Comment
Please, Sign In to add comment