User prompt
change control to touch screen. by moving finger left and right car is movinf left and right
User prompt
car can stillbe not controled by the arrow keys, fix bug
User prompt
fix the error: car cannot be controled
User prompt
Fix Bug: 'TypeError: window.addEventListener is not a function' in this line: 'window.addEventListener('keydown', function (event) {' Line Number: 1
User prompt
car is not moving by using arrow keys. make sure car can be controled by arrow left and right
User prompt
Fix Bug: 'TypeError: document is undefined' in this line: 'document.addEventListener('keydown', function (event) {' Line Number: 20
User prompt
player can control car with arrow left and right to move car left and right
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
Initial prompt
One way road
===================================================================
--- original.js
+++ change.js
@@ -1,11 +1,10 @@
-window.addEventListener('keydown', function (event) {
- if (event.key === 'ArrowLeft') {
- player.moveLeft();
- } else if (event.key === 'ArrowRight') {
- player.moveRight();
- }
+this.on('swipeleft', function () {
+ player.moveLeft();
});
+this.on('swiperight', function () {
+ player.moveRight();
+});
var Car = Container.expand(function () {
var self = Container.call(this);
var carGraphics = self.createAsset('car', 'Car Graphics', .5, .5);
self.speed = 5;
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.