Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. detectCollision(ox, oy) {
  2.     // top-left corner
  3.     if (this.x < (0 - (this.car.width / 2)) || this.y < (0 - (this.car.height / 2))) {
  4.         this.x = ox;
  5.         this.y = oy;
  6.     }
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement