User prompt
display the roads at the bottom
User prompt
display the roads on top
Code edit (2 edits merged)
Please save this source code
User prompt
center the instructions text
User prompt
move the swipetext into the middle
User prompt
build roads out of blocks
User prompt
trigger game over when the countdown is 0
User prompt
make the score text yellow
User prompt
make the countdown timer red
User prompt
show a timer that counts down from 10 when a new target was spawned
Code edit (1 edits merged)
Please save this source code
User prompt
display targets with a padding of 100 to the screen border
User prompt
set the minimum distance of each new target to be half the screens height
User prompt
add text that says "swipe left and right"
User prompt
make gameover when the bus collides with the border
User prompt
move the target to a different position when the bus collides
User prompt
add a score variable and display it
User prompt
Fix Bug: 'TypeError: scoreTxt.getText is not a function' in this line: 'scoreTxt.setText(parseInt(scoreTxt.getText()) + 1);' Line Number: 103
User prompt
Fix Bug: 'TypeError: parseInt is not a function' in this line: 'scoreTxt.setText(parseInt(scoreTxt.text) + 1);' Line Number: 103
User prompt
Fix Bug: 'TypeError: scoreTxt.getText is not a function' in this line: 'scoreTxt.setText(parseInt(scoreTxt.getText()) + 1);' Line Number: 103
User prompt
not do anything else than increasing the score when a collision happens
User prompt
Fix Bug: 'TypeError: parseInt is not a function' in this line: 'scoreTxt.setText(parseInt(scoreTxt.text) + 1);' Line Number: 107
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: scoreTxt.getText is not a function' in this line: 'scoreTxt.setText(parseInt(scoreTxt.getText()) + 1);' Line Number: 107
User prompt
Fix Bug: 'TypeError: parseInt is not a function' in this line: 'scoreTxt.setText(parseInt(scoreTxt.text) + 1);' Line Number: 107
===================================================================
--- original.js
+++ change.js
@@ -85,9 +85,9 @@
self.addChild(background);
for (var i = 0; i < roadLength; i++) {
for (var j = 0; j < LK.stage.width / roadBlockWidth; j++) {
var roadBlock = new RoadBlock();
- roadBlock.setPosition(j * roadBlockWidth, 2732 / 2 + i * roadBlockHeight);
+ roadBlock.setPosition(j * roadBlockWidth, LK.stage.height - roadBlockHeight * (roadLength - i));
roadBlocks.push(roadBlock);
}
}
roadBlocks.forEach(function (block) {
Simple Car Steering Wheel. In-Game asset. 2d. Blank background. Svg
bomb Single Game Texture. In-Game asset. 2d. No shadows. flat. detailed
yellow bus stop symbol svg Single Game Texture. In-Game asset. 2d. No shadows. flat. detailed
yellow bus symbol svg. roof. top down. Single Game Texture. In-Game asset. 2d. No shadows. flat. detailed
dark transparent dust particle Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.