Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var xVel = 0; var yVel = 0; var x = 50; var y = 50; setInterval(function() {yVel += 0.5; if (y > 100) {yVel = Math.random() * -10; xVel += Math.random() * 5 - 2.5;} if (x > 100) {xVel = -Math.abs(xVel)}; if (x < 0) {xVel = Math.abs(xVel)}; xVel *= 0.98; yVel *= 0.98; x += xVel; y += yVel; MPP.client.sendArray([{m:'m', x, y}])}, 50)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement