Code edit (8 edits merged)
Please save this source code
User prompt
Analyse the code then adapt it to make player appear behind the road assets but WITHOUT changing any of the road or player movment logic
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: road is undefined' in or related to this line: 'var player = game.addChild(new Player({' Line Number: 1155
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: road is undefined' in or related to this line: 'var player = game.addChild(new Player({' Line Number: 1152
Code edit (2 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'parent.attachAsset(asset, {' Line Number: 214
User prompt
Please fix the bug: 'TypeError: parent is undefined' in or related to this line: 'parent.attachAsset(asset, {' Line Number: 214
User prompt
make clouds appear in front of player (z-index) but without altering their logic or movement
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: clone is not defined' in or related to this line: 'if (clone) {' Line Number: 254
Code edit (11 edits merged)
Please save this source code
User prompt
now use attachObjectRadial instead of attachAssetRadial for walls
User prompt
Add a new class for Wall similar to Detritus
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (2 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: player.slideStart is not a function' in or related to this line: 'player.slideStart();' Line Number: 1109
Code edit (1 edits merged)
Please save this source code
User prompt
add a flag to start detecting swipe only after tap
Code edit (15 edits merged)
Please save this source code
User prompt
don't forget to reset startY
===================================================================
--- original.js
+++ change.js
@@ -639,8 +639,11 @@
self.slideStart = slideStart;
self.slideEnd = slideEnd;
;
function update() {
+ if (!road) {
+ return;
+ }
var nextNode = road.getNode(1);
var currentNode = nextNode.previous;
// Update horizontal movement
var outputSpeed = PLAYER_SPEED_BASE * speedFactor;
@@ -1101,12 +1104,8 @@
var sun = game.addChild(new Sun({
x: GAME_WIDTH / 2,
y: 50
}));
-var road = game.addChild(new Road({
- x: GAME_WIDTH / 2,
- y: GAME_HEIGHT - GAME_WIDTH / 2
-}));
var player = game.addChild(new Player({
x: road.x,
y: road.y,
scale: 0.5
white
circle sliced into many pieces, flat image. 2d, white background, shadowless.
pixel art of a tall, tree. game asset, 2d, white background, shadowless.
pixel art cloud. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
dark space.
flying lava bubble. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a bonus crystal ball with the recycle symbol. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
top view A green round start button empty in the center like a ring.