misty
This commit is contained in:
@@ -60,10 +60,10 @@ this.update = function(dt) {
|
||||
|
||||
// Collide with paddle 1?
|
||||
if (r>left1 && l<right1 && t>bottom1 && b<top1)
|
||||
ball.vx = number.abs(ball.vx)
|
||||
ball.vx = abs(ball.vx)
|
||||
// Collide with paddle 2?
|
||||
if (r>left2 && l<right2 && t>bottom2 && b<top2)
|
||||
ball.vx = -number.abs(ball.vx)
|
||||
ball.vx = -abs(ball.vx)
|
||||
|
||||
// Check left/right out-of-bounds
|
||||
if (r<0) { score2++; resetBall() }
|
||||
|
||||
Reference in New Issue
Block a user