User prompt
Decrease in the quantity of rocks
User prompt
Decrease the quantity of rock
User prompt
Increase the quantity of obstacle
User prompt
If hero touch side game over
Code edit (2 edits merged)
Please save this source code
User prompt
Score=hero claim rock
User prompt
Score increase as the hero touch rock
User prompt
Score increase when the hero touch rock
User prompt
If hero touch rock the rock disappears
User prompt
At some rocks
Code edit (1 edits merged)
Please save this source code
User prompt
Remove this command
User prompt
The dot come at bottom automatically after one touch in left button
User prompt
Dot come in button after touching any button
User prompt
If the dot touch right button the hero go right side
User prompt
Create a right button on right side
User prompt
If the dot touch left button the hero go left side
User prompt
Hero spawn above the left button
User prompt
More above
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'x')' in or related to this line: 'hero.x = leftButton.x;' Line Number: 76
User prompt
Hero spawn above the left button
User prompt
Little bit up
User prompt
Hero spawn at left side
User prompt
Dot move as user wants
User prompt
Create a dot
===================================================================
--- original.js
+++ change.js
@@ -98,12 +98,16 @@
hero.update();
// Check if dot intersects with left button
if (dot.intersects(leftButton)) {
hero.x -= hero.speed;
+ dot.x = leftButton.x;
+ dot.y = leftButton.y;
}
// Check if dot intersects with right button
if (dot.intersects(rightButton)) {
hero.x += hero.speed;
+ dot.x = rightButton.x;
+ dot.y = rightButton.y;
}
// Update obstacles
for (var i = obstacles.length - 1; i >= 0; i--) {
obstacles[i].update();
Right button. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Road. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Road Car. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Coin. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.