Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2015
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. if (object.getRect(stage).containsRect( this.getRect(stage) ))
  2. {
  3. collision = true;
  4. }
  5.  
  6. if (collision)
  7. {
  8. while (collision)
  9. {
  10. this._playervY = 0;
  11. this.y -= 1.1;
  12.  
  13. collision = false;
  14.  
  15. if (object.getRect(stage).containsRect( this.getRect(stage) ))
  16. {
  17. collision = true;
  18. }
  19.  
  20. }
  21.  
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement