Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- detectCollision(ox, oy) {
- // top-left corner
- if (this.x < (0 - (this.car.width / 2)) || this.y < (0 - (this.car.height / 2))) {
- this.x = ox;
- this.y = oy;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement