User prompt
increase the players speed a alittle bit when i swipe
User prompt
decrease the players speed when i swipe
User prompt
make the swiping slower
User prompt
when i swipe left or right with my cursor then the shooter should move
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'addEventListener')' in or related to this line: 'document.addEventListener('keydown', function (event) {' Line Number: 215
User prompt
on laptop the player should move left when i press A and it should move right when i press D. It should shoot when i press left click
User prompt
remove the x
User prompt
Please fix the bug: 'Uncaught ReferenceError: x is not defined' in or related to this line: 'var deltaX = x - startX;' Line Number: 70
User prompt
Please fix the bug: 'Uncaught ReferenceError: x is not defined' in or related to this line: 'var deltaX = x - startX;' Line Number: 70
User prompt
Please fix the bug: 'Uncaught ReferenceError: obj is not defined' in or related to this line: 'var deltaX = obj.event.x - startX;' Line Number: 70
User prompt
Please fix the bug: 'Uncaught ReferenceError: x is not defined' in or related to this line: 'var deltaX = x - startX;' Line Number: 70
User prompt
Remove the arrows and also the player should move when screen is swiped
User prompt
Make the player movement very fast
User prompt
Make the players movement fast when arrows r pressed
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot set properties of undefined (setting 'down')' in or related to this line: 'leftArrow.down = function (x, y, obj) {' Line Number: 65
User prompt
The player should move with the arrows
User prompt
The player should move swiftly just like when it was moving before I had placedthe arrows
User prompt
The player should move swiftly when arrows r pressed
User prompt
The player should slide when pressed the arrows
User prompt
The players should move with the arrows buttons
User prompt
The player should only move with the arrows and not when the screen is swiped
User prompt
Remove the shooting button and the bullets should only spawn when pressed the screen
User prompt
When pressed the shooting button the player should not automatically move on the left side
User prompt
Make it so that the player can only shoot with the bullet icon on the Right side
===================================================================
--- original.js
+++ change.js
@@ -75,15 +75,27 @@
});
game.addChild(rightArrow);
// Add event listeners for arrow buttons
leftArrow.down = function () {
- player.x -= player.speed;
+ var slideInterval = LK.setInterval(function () {
+ player.x -= player.speed / 10;
+ if (player.x < player.width / 2) {
+ player.x = player.width / 2;
+ LK.clearInterval(slideInterval);
+ }
+ }, 16);
if (player.x < player.width / 2) {
player.x = player.width / 2;
}
};
rightArrow.down = function () {
- player.x += player.speed;
+ var slideInterval = LK.setInterval(function () {
+ player.x += player.speed / 10;
+ if (player.x > 2048 - player.width / 2) {
+ player.x = 2048 - player.width / 2;
+ LK.clearInterval(slideInterval);
+ }
+ }, 16);
if (player.x > 2048 - player.width / 2) {
player.x = 2048 - player.width / 2;
}
};