Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. public static void repaint(int w, int h, float accelerotmetre[]) {
  2.  
  3. float Vx=3;
  4. float Vy=3;
  5.  
  6. /*{
  7. radius +=3;
  8. x1=300;
  9. y1=400;
  10. }*/
  11.  
  12. if (accelerotmetre[1] < -2 && y >= 60 ) {
  13. y -= Vy - (accelerotmetre[1]);
  14. }
  15.  
  16. if (accelerotmetre[1] > 2 &&y <= h-61) {
  17. y += Vy + (accelerotmetre[1]);
  18. }
  19.  
  20.  
  21. if (accelerotmetre[0] < -2 && x <= w-61) {
  22. x += Vx - (accelerotmetre[0] );
  23. }
  24. if (accelerotmetre[0] > 2 && x >=60) {
  25. x -= Vx + (accelerotmetre[0]);
  26. }
  27.  
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement