User prompt
play bling when a coin is collected
User prompt
Please fix the bug: 'TypeError: Cannot set properties of null (setting 'update')' in or related to this line: 'leftPlayer.update = function () {' Line Number: 1306
User prompt
play swipe when player splits and when it gets back together
User prompt
Please fix the bug: 'TypeError: Cannot read properties of null (reading 'y')' in or related to this line: 'trail.y = leftPlayer.y + leftPlayer.height / 2;' Line Number: 1326
User prompt
Please fix the bug: 'TypeError: Cannot read properties of null (reading 'y')' in or related to this line: 'trail.y = leftPlayer.y + leftPlayer.height / 2;' Line Number: 1326
User prompt
Please fix the bug: 'TypeError: Cannot set properties of undefined (setting 'update')' in or related to this line: 'leftPlayer.update = function () {' Line Number: 1308
User prompt
Please fix the bug: 'TypeError: Cannot read properties of null (reading 'y')' in or related to this line: 'trail.y = leftPlayer.y + leftPlayer.height / 2;' Line Number: 1329
User prompt
use jump sound when player jumps
User prompt
Please fix the bug: 'Uncaught Error: The supplied DisplayObject must be a child of the caller' in or related to this line: 'game.addChildAt(trail, game.getChildIndex(this));' Line Number: 1052
User prompt
Play jump sound when player jumps
User prompt
play powerup when powerup is collected
User prompt
play powerup when shhield is up
User prompt
play destroy when an obstacle is destroyed by the player with the shield.
User prompt
play destroy sound when player is destoyed
User prompt
play select sound when a menu option is selected
User prompt
Please fix the bug: 'TypeError: Cannot set properties of undefined (setting 'update')' in or related to this line: 'leftPlayer.update = function () {' Line Number: 1324
User prompt
sield should blink twice before it is desactivated
User prompt
Please fix the bug: 'TypeError: Cannot set properties of null (setting 'update')' in or related to this line: 'leftPlayer.update = function () {' Line Number: 1345
User prompt
shield should blink for the last 2 seconds of it existance
User prompt
when shield has been up for 7 seconds, make its alpha 0 and 1 for alternating for those last 2 seconds until it disappears
User prompt
coins should slowly float and very very little increase and decrease size
User prompt
obstacle explosion should be a little biger and with more particles
User prompt
set obstacle particle color on explosion to: #82ee3a
User prompt
Player is destroyed, before game over show message that says how many miles have been run and how many coins have been collected. Ahow this for 4 seconds before game over screen
User prompt
Do not flash screen when player is destoyed
===================================================================
--- original.js
+++ change.js
@@ -88,9 +88,9 @@
} else {
trail.x = 0;
}
trail.y = self && self.y !== undefined ? self.y + (leftPlayerGraphics ? leftPlayerGraphics.height / 2 : 0) : 0;
- self.addChild(trail);
+ game.addChildAt(trail, game.getChildIndex(self));
}
};
});
var LineObstacle = Container.expand(function () {
@@ -381,9 +381,9 @@
} else {
trail.x = 0;
}
trail.y = self && self.y !== undefined ? self.y + (rightPlayerGraphics ? rightPlayerGraphics.height / 2 : 0) : 0;
- self.addChild(trail);
+ game.addChildAt(trail, game.getChildIndex(self));
}
};
});
//<Assets used in the game will automatically appear here>
@@ -975,77 +975,75 @@
leftPlayer.y = player.y;
game.addChild(leftPlayer);
}
if (leftPlayer) {
- if (animationDuration > 0) {
- leftPlayer.x += (leftTargetX - leftPlayer.x) / animationDuration;
- animationDuration--;
- }
- if (LK.ticks % 4 == 0) {
- var trail = new Trail();
- trail.scale.x = 0.5;
- trail.scale.y = 0.5;
- if (leftPlayer && leftPlayer.x !== undefined) {
- trail.x = leftPlayer.x;
- } else {
- trail.x = 0;
+ leftPlayer.update = function () {
+ if (animationDuration > 0) {
+ leftPlayer.x += (leftTargetX - leftPlayer.x) / animationDuration;
+ animationDuration--;
}
- trail.y = leftPlayer && leftPlayer.y !== undefined ? leftPlayer.y + (leftPlayer.height ? leftPlayer.height / 2 : 0) : 0;
- game.addChildAt(trail, game.getChildIndex(this));
- }
- }
- ;
- }
- if (!rightPlayer) {
- rightPlayer = new RightPlayer();
- rightPlayer.x = player.x;
- rightPlayer.y = player.y;
- game.addChild(rightPlayer);
- if (rightPlayer) {
- if (animationDuration > 0) {
- rightPlayer.x += (rightTargetX - rightPlayer.x) / animationDuration;
- animationDuration--;
- }
- if (LK.ticks % 4 == 0) {
- var trail = new Trail();
- trail.scale.x = 0.5;
- trail.scale.y = 0.5;
- if (rightPlayer && rightPlayer.x !== undefined) {
- trail.x = rightPlayer.x;
- } else {
- trail.x = 0;
- }
- trail.y = rightPlayer && rightPlayer.y !== undefined ? rightPlayer.y + (rightPlayer.height ? rightPlayer.height / 2 : 0) : 0;
- game.addChildAt(trail, game.getChildIndex(this));
- }
- }
- ;
- }
- // Initialize update functions after adding to game
- if (leftPlayer) {
- leftPlayer.update = function () {
- if (animationDuration > 0) {
- leftPlayer.x += (leftTargetX - leftPlayer.x) * 0.1; // Smooth movement using linear interpolation
- animationDuration--;
- titleButton.update = function () {
- if (LK.ticks % 60 < 30) {
- titleButton.y += 1;
- } else {
- titleButton.y -= 1;
- }
- };
if (LK.ticks % 4 == 0) {
var trail = new Trail();
trail.scale.x = 0.5;
trail.scale.y = 0.5;
- trail.x = leftPlayer ? leftPlayer.x : 0;
- trail.y = leftPlayer && leftPlayer.y !== undefined ? leftPlayer.y + (leftPlayer.height ? leftPlayer.height / 2 : 0) : 0;
- leftPlayer.addChild(trail);
+ if (leftPlayer && leftPlayer.x !== undefined) {
+ trail.x = leftPlayer.x;
+ } else {
+ trail.x = 0;
+ }
+ trail.y = this.y + (leftPlayer.height ? leftPlayer.height / 2 : 0);
+ game.addChildAt(trail, game.getChildIndex(this));
}
+ };
+ }
+ if (!rightPlayer) {
+ rightPlayer = new RightPlayer();
+ rightPlayer.x = player.x;
+ rightPlayer.y = player.y;
+ game.addChild(rightPlayer);
+ if (rightPlayer) {
+ rightPlayer.update = function () {
+ if (animationDuration > 0) {
+ rightPlayer.x += (rightTargetX - rightPlayer.x) / animationDuration;
+ animationDuration--;
+ }
+ if (LK.ticks % 4 == 0) {
+ var trail = new Trail();
+ trail.scale.x = 0.5;
+ trail.scale.y = 0.5;
+ if (rightPlayer && rightPlayer.x !== undefined) {
+ trail.x = rightPlayer.x;
+ } else {
+ trail.x = 0;
+ }
+ trail.y = this.y + (rightPlayer.height ? rightPlayer.height / 2 : 0);
+ game.addChildAt(trail, game.getChildIndex(this));
+ }
+ };
}
- ;
- };
- if (rightPlayer) {
+ // Initialize update functions after adding to game
+ leftPlayer.update = function () {
+ if (animationDuration > 0) {
+ leftPlayer.x += (leftTargetX - leftPlayer.x) * 0.1; // Smooth movement using linear interpolation
+ animationDuration--;
+ titleButton.update = function () {
+ if (LK.ticks % 60 < 30) {
+ titleButton.y += 1;
+ } else {
+ titleButton.y -= 1;
+ }
+ };
+ if (LK.ticks % 4 == 0) {
+ var trail = new Trail();
+ trail.scale.x = 0.5;
+ trail.scale.y = 0.5;
+ trail.x = leftPlayer ? leftPlayer.x : 0;
+ trail.y = leftPlayer && leftPlayer.height ? leftPlayer.y + leftPlayer.height / 2 : 0;
+ game.addChildAt(trail, game.getChildIndex(leftPlayer));
+ }
+ }
+ ;
+ };
rightPlayer.update = function () {
if (animationDuration > 0) {
rightPlayer.x += (rightTargetX - rightPlayer.x) * 0.1; // Smooth movement using linear interpolation
animationDuration--;
@@ -1061,10 +1059,10 @@
var trail = new Trail();
trail.scale.x = 0.5;
trail.scale.y = 0.5;
trail.x = rightPlayer ? rightPlayer.x : 0;
- trail.y = rightPlayer && rightPlayer.y !== undefined ? rightPlayer.y + (rightPlayer.height ? rightPlayer.height / 2 : 0) : 0;
- rightPlayer.addChild(trail);
+ trail.y = rightPlayer && rightPlayer.height ? rightPlayer.y + rightPlayer.height / 2 : 0;
+ game.addChildAt(trail, game.getChildIndex(rightPlayer));
}
};
}
;
@@ -1116,9 +1114,9 @@
var trail = new Trail();
trail.scale.x = 0.5;
trail.scale.y = 0.5;
trail.x = leftPlayer ? leftPlayer.x : 0;
- trail.y = leftPlayer && leftPlayer.y !== undefined ? leftPlayer.y + (leftPlayer.height ? leftPlayer.height / 2 : 0) : 0;
+ trail.y = leftPlayer.y + leftPlayer.height / 2;
game.addChildAt(trail, game.getChildIndex(leftPlayer));
}
};
rightPlayer.update = function () {
cartoon white circle. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
cartoon light blue circle. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
cartoon white square. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
black rectangle