Advertisement
Guest User

Untitled

a guest
May 25th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. xpos = xpos + ( xspeed * xdirection );
  2. ypos = ypos + ( yspeed * ydirection );
  3.  
  4.  
  5. if (xpos > width-rad || xpos < rad) {
  6. xdirection *= -1;
  7. }
  8. if (ypos > height-rad || ypos < rad) {
  9. ydirection *= -1;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement