Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void repaint(int w, int h, float accelerotmetre[]) {
- float Vx=3;
- float Vy=3;
- /*{
- radius +=3;
- x1=300;
- y1=400;
- }*/
- if (accelerotmetre[1] < -2 && y >= 60 ) {
- y -= Vy - (accelerotmetre[1]);
- }
- if (accelerotmetre[1] > 2 &&y <= h-61) {
- y += Vy + (accelerotmetre[1]);
- }
- if (accelerotmetre[0] < -2 && x <= w-61) {
- x += Vx - (accelerotmetre[0] );
- }
- if (accelerotmetre[0] > 2 && x >=60) {
- x -= Vx + (accelerotmetre[0]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement