User prompt
dont write "$10.00" but "$10"
Code edit (1 edits merged)
Please save this source code
User prompt
change the coin collet flash color to green
User prompt
change the coin collet flash color to white
Code edit (5 edits merged)
Please save this source code
User prompt
- add a freePath() function in ObstacleManager - call freePath in Obstacle.reset()
Code edit (3 edits merged)
Please save this source code
User prompt
add logs in ObstacleManager update (use log())
Code edit (1 edits merged)
Please save this source code
User prompt
add isDebug global = false
User prompt
use lastObstacleSpawnTime instead of lastObstacleHitTime
User prompt
use baseObstacleSpawnDelay in ObstacleManager; add another global if required
User prompt
add a global baseObstacleSpawnDelay = 2000
Code edit (1 edits merged)
Please save this source code
User prompt
Implement ObstacleManagerUpdate() function
Code edit (1 edits merged)
Please save this source code
User prompt
in ObstacleManager, add an update function
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: obstacleManager is not defined' in or related to this line: 'obstacleManager.setPathOccupied(self.pathIndex, false); // Mark the path as unoccupied' Line Number: 481
User prompt
now create a ObstacleManager class that will be responsible of handling Obstacles path and active state globally
User prompt
add a propery active to Obstacle class
User prompt
obstacles spawn configuration is always the same, randomize it in order to have sometimes 1 obstacle, sometimes 2 spawned at same time (not same path)
User prompt
obstacles configuration is always the same, randomize it
User prompt
using index property of obstacles and reset() function, invent a way to avoid having 2 obstacles spwaned on the same path at the same time
User prompt
use baseNbObstacles to loop on obstacles spawn
===================================================================
--- original.js
+++ change.js
@@ -480,9 +480,9 @@
}
});
};
self.update = function () {
- self.updateObstacles();
+ // Activate obstacles regularly in random path
};
self.isPathOccupied = function (pathIndex) {
return self.occupiedPaths[pathIndex];
};
@@ -966,11 +966,9 @@
} else if (score < 10) {
scoreTxt.setText("$" + score.toFixed(2));
} else {
scoreTxt.setText("$" + score.toFixed(0));
- obstacleManager.update();
}
- ;
}
function easeInOutQuad(t) {
return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;
}
Directly overhead, plumb view of a beggar heading top (we see his back).. Zenith view, directly overhead, plumb view. NOT PERSPECTIVE! Fantasy theme. Pixel art
a traffic cone. video game sprite
face view of a big start button in the shape of a dollar bill. video game style
a tree. video game style
a black garbage bag. video game style
Dollar bill. Perspective. video game sprite
perspective of a simple snake rolled up on itself.. video game sprite
Ball of dry desert bushes. video game sprite
tractor. high definition video game sprite
street ad billboard with 1 or 2 posts with "Get rich!" on it. high definition video game sprite
a dog sleeping on a street. video game sprite
desert bush. video game sprite
profile view of an empty motorcycle helmet. black with a white vertical central band and another thiner orange band on the center. NOT PERSPECTIVE!. Pixel art high definition
simple red and white magnet. video game style
gold sign with a "X" and a "2". video game style
bgMusic
Music
coin_1
Sound effect
hit_1
Sound effect
hit_2
Sound effect
hit_3
Sound effect
levelWin_1
Sound effect
car_1
Sound effect
police_1
Sound effect
ambulance_1
Sound effect
accident_1
Sound effect
killed_1
Sound effect
jump_1
Sound effect
rip_1
Sound effect
bonus_take
Sound effect
bonus_approaching
Sound effect