Code edit (1 edits merged)
Please save this source code
User prompt
in adjustScore replace scoreText.setText(String(score).padStart(6, '0')); by a the kgCollected with 2 digits
Code edit (4 edits merged)
Please save this source code
User prompt
when collecting a detritus add 0.01 to kgCollected
Code edit (9 edits merged)
Please save this source code
User prompt
extract this code : self.body.torso.tint = 0xff0000; // Tint the player's torso red self.body.legUpperLeft.children[0].tint = 0xff0000; // Tint the player's upper left leg red self.body.legUpperRight.children[0].tint = 0xff0000; // Tint the player's upper right leg red self.body.armUpperLeft.children[0].tint = 0xff0000; // Tint the player's upper left arm red self.body.armUpperRight.children[0].tint = 0xff0000; // Tint the player's upper right arm red self.body.armLowerLeft.tint = 0xff0000; self.body.armLowerRight.tint = 0xff0000; self.body.legLowerLeft.tint = 0xff0000; self.body.legLowerRight.tint = 0xff0000; self.body.pelvis.tint = 0xff0000; // Tint the player's pelvis red self.body.head.tint = 0xff0000; // Tint the player's head red self.body.footRight.tint = 0xff0000; self.body.footLeft.tint = 0xff0000; to a global function. user player global variable and make the color a parameter
Code edit (1 edits merged)
Please save this source code
User prompt
like for torso : self.body.torso.tint = 0xff0000; // Tint the player red Tint every other part in red when player fall in reiver
User prompt
in playerbody, like for torso, add a public property for each asset but dont replace existing local variables, just add new properties: example : var pelvis = ...; // Don't touch that self.pelvis = pelvis; // Add that
User prompt
Please fix the bug: 'ReferenceError: torso is not defined' in or related to this line: 'self.pelvis = self.attachAsset('pelvis', {' Line Number: 540
User prompt
in playerbody, like for torso, add a public property for each asset
Code edit (21 edits merged)
Please save this source code
User prompt
when player hits river, tint the player all in red
User prompt
when player hits river, tint it all in red
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (3 edits merged)
Please save this source code
User prompt
play slide sound when sliding
Code edit (7 edits merged)
Please save this source code
User prompt
in callGameOver wait 1sec befaore falling gameover
Code edit (1 edits merged)
Please save this source code
User prompt
adapt the speed of the jump and the speed of the fall to the player speed.
User prompt
make that at high speed player don't jump too far because of its speed
Code edit (2 edits merged)
Please save this source code
User prompt
adapt jump and gravity to speed so that at high speed player doesn't jump too far becaus of speed
===================================================================
--- original.js
+++ change.js
@@ -126,18 +126,18 @@
self.background = background;
self.attachAsset('roadSegment', {
anchorX: 1,
anchorY: 1,
- tint: 0x62C344
+ tint: 0xFF0000
});
self.segment = self.attachAsset('roadSegment', {
anchorX: 1,
anchorY: 1,
scaleX: 0.95,
scaleY: 0.95,
tint: 0x62C344 // TEMP DEBUG0x555555
});
- self.segmentRiver = self.attachAsset('river', {
+ self.segmentRiver = self.attachAsset('lava', {
anchorX: 1,
anchorY: 1,
scaleX: 0.95,
scaleY: 0.95,
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.