Code edit (2 edits merged)
Please save this source code
User prompt
the playerDuck instance is not showb
Code edit (3 edits merged)
Please save this source code
User prompt
create a "finishLine" graphic and place it at the right side
Code edit (8 edits merged)
Please save this source code
User prompt
the opponent ducks are moving at the same speed. Make it that they slow down / speed up randomly
User prompt
after start, play the duck sound in random intervals
User prompt
make a graphic waves
User prompt
spawn multiple waves at the bottom
User prompt
make the waves move up and down in a wave movement
===================================================================
--- original.js
+++ change.js
@@ -77,11 +77,16 @@
var playerDuck = game.addChild(new PlayerDuck());
var finishLine = game.addChild(LK.getAsset('finishLine', {}));
finishLine.x = 2048 - finishLine.width - 50;
finishLine.y = 0;
-var wave = game.addChild(LK.getAsset('wave', {}));
-wave.x = 0;
-wave.y = 2732 - wave.height;
+// Create multiple wave instances and position them at the bottom of the screen
+var waves = [];
+for (var i = 0; i < 5; i++) {
+ var wave = game.addChild(LK.getAsset('wave', {}));
+ wave.x = i * wave.width;
+ wave.y = 2732 - wave.height;
+ waves.push(wave);
+}
var lastDuck = ducks[ducks.length - 1];
playerDuck.y = lastDuck.y + lastDuck.height + 100;
playerDuck.x = startX;
var score = 0;