User prompt
the 0 - 0 doesnt work
User prompt
Make a tennis background
User prompt
when tennis ball hits racket lay MusicBG1
User prompt
Add a line in the middle of the screen to represent the little tennis line
User prompt
Make it when the tennis racket touches the ball, Play MusicBG1
User prompt
Make it so every 5 hits, The ball goes faster
User prompt
The score doesnt work
Initial prompt
Tennis Racket
===================================================================
--- original.js
+++ change.js
@@ -80,10 +80,16 @@
} else {
aiPaddle.x -= 5;
}
// Ball collision with paddles
+ var hitCount = 0;
if (ball.intersects(playerPaddle) || ball.intersects(aiPaddle)) {
ball.speedY *= -1;
+ hitCount++;
+ if (hitCount % 5 == 0) {
+ ball.speedY *= 1.2;
+ ball.speedX *= 1.2;
+ }
}
// Scoring
if (ball.y <= 0) {
aiScore++;
Tennis Racket. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Tennis Ball. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Tennis Court Background. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Up view