Code edit (20 edits merged)
Please save this source code
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: 1313
User prompt
use swipe sound when player is swiped left or right
User prompt
also play swipe when player moves riht
User prompt
play backgroundmusic ono game start
User prompt
music can start playing on main menu
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
===================================================================
--- original.js
+++ change.js
@@ -294,8 +294,9 @@
} // Prevent player movement when the home screen is up
if (self.lane < 2 && !self.isMoving && !leftPlayer && !rightPlayer) {
self.lane++;
self.transitionToLane(lanes[self.lane]);
+ LK.getSound('swipe').play();
}
};
self.jump = function () {
if (!self.isMoving && !self.isJumping && !leftPlayer && !rightPlayer) {
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