User prompt
player can run into three cars before the game is over instead of one time.
User prompt
player can hit three cars before the game is over
User prompt
change that player can crash into three cars before game over.
User prompt
Fix Bug: 'ReferenceError: laneWidth is not defined' in this line: 'self.x = Math.floor((self.x - laneWidth) / laneWidth) * laneWidth + laneWidth / 2;' Line Number: 25
User prompt
Fix Bug: 'ReferenceError: laneWidth is not defined' in this line: 'self.x = Math.ceil((self.x + laneWidth) / laneWidth) * laneWidth + laneWidth / 2;' Line Number: 28
User prompt
when pushing button left or right players car needs to jump to center between lanes
User prompt
when pushing button left or right players car needs to jump to middle of next lane where cars are aproaching
User prompt
when pushing button car needs to jump to middle of next lane
User prompt
Fix Bug: 'TypeError: self.setInteractive is not a function' in this line: 'self.setInteractive(true);' Line Number: 4
User prompt
add two buttons on bottom left and right side to control the car
User prompt
when pushing buttons car needs to jump to middle of next lane
User prompt
when pushing buttons car needs to jump to next lane
User prompt
when pushing buttons car needs to jump to center of next lane
User prompt
add two buttons at bottom left and right to control players car
User prompt
use laneimage from top zo bottom of screen
User prompt
setup six lines in which the cars are moving. seperate each lane with a dashed white line.
User prompt
benutze die linemarker grafik um die bahnen zu trrnnen
User prompt
Fix Bug: 'TypeError: cars[a] is undefined' in this line: 'cars[a].move();' Line Number: 28
User prompt
Fix Bug: 'TypeError: player.update is not a function' in this line: 'player.update();' Line Number: 27
User prompt
Count and display the cars the player passes.
User prompt
display the scoreboard result by printing it on scrren in white font
User prompt
Add a counter that counts the cars the player passes. display the count on a scoreboard placed on the screen top center.
User prompt
Fix Bug: 'TypeError: LK.effects.playSound is not a function' in this line: 'LK.effects.playSound('carCrashSound');' Line Number: 99
User prompt
Fix Bug: 'TypeError: LK.sound is undefined' in this line: 'LK.sound.play('carCrashSound');' Line Number: 99
User prompt
Fix Bug: 'TypeError: LK.getAsset(...).play is not a function' in this line: 'LK.getAsset('carCrashSound', 'Car Crash Sound').play();' Line Number: 99
===================================================================
--- original.js
+++ change.js
@@ -20,8 +20,9 @@
});
var Player = Container.expand(function () {
var self = Container.call(this);
var playerGraphics = self.createAsset('player', 'Player Graphics', .5, .5);
+ self.crashes = 0;
self.moveLeft = function (laneWidth) {
self.x = Math.floor((self.x - laneWidth) / laneWidth) * laneWidth + laneWidth / 2;
};
self.moveRight = function (laneWidth) {
@@ -64,10 +65,13 @@
self.addChild(newCar);
}
for (var i = 0; i < cars.length; i++) {
if (player.intersects(cars[i])) {
- LK.effects.flashScreen(0xff0000, 1000);
- LK.showGameOver();
+ player.crashes++;
+ if (player.crashes >= 3) {
+ LK.effects.flashScreen(0xff0000, 1000);
+ LK.showGameOver();
+ }
}
}
});
leftButton.on('down', function (obj) {
generatr a image of a car with style like lambougini. we need to see the car from the top Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
generate a picture of a classic car. view from top. Vertical direction Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
generate a arcade like round button in red color Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
generate image single white dashed road edge marking line. vertical direction. exempted. no background. just simple line nothing else on pic Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.