This commit is contained in:
2026-01-16 20:56:16 -06:00
parent 9f6435ece9
commit 22962bbd63
33 changed files with 643 additions and 315 deletions

View File

@@ -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() }