User prompt
Fix Bug: 'TypeError: event.getLocalPosition is not a function' in this line: 'var pos = event.getLocalPosition(self);' Line Number: 87
User prompt
Fix Bug: 'Uncaught TypeError: self.onclick is not a function' in this line: 'self.onclick(function (event) {' Line Number: 86
Code edit (1 edits merged)
Please save this source code
User prompt
When the user mouse clicks on the screen, set the target position of the player to be where the mouse was clicked
User prompt
When the user touches or clicks on the screen, move the player towards that position
User prompt
Remove all the code to do with keypresses
User prompt
Move the player around the screen with WASD or arrow keys
User prompt
IS `update` the right event?
User prompt
the `LK.on('tick')` event is not firing, is this the right event?
User prompt
The player is not moving when I press up
User prompt
Move the player up when I press A or the up arrow key
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'OutlineFilter')' in this line: 'playerGraphics.filters = [new LK.filters.OutlineFilter(2, 0xFFFFFF)];' Line Number: 4
User prompt
Got an error `filters is not defined`
User prompt
Fix Bug: 'Uncaught ReferenceError: filters is not defined' in this line: 'playerGraphics.filters = [new filters.OutlineFilter(2, 0xFFFFFF)];' Line Number: 4
User prompt
Fix Bug: 'Uncaught ReferenceError: filters is not defined' in this line: 'playerGraphics.filters = [new filters.OutlineFilter(2, 0xFFFFFF)];' Line Number: 4
User prompt
Add a white outline to the player object so that the user can see them better against the background
User prompt
`filters` is not defined?
User prompt
Fix Bug: 'Uncaught ReferenceError: filters is not defined' in this line: 'playerGraphics.filters = [new filters.OutlineFilter(1, 0xFFFFFF)];' Line Number: 4
User prompt
Fix Bug: 'Uncaught ReferenceError: filters is not defined' in this line: 'playerGraphics.filters = [new filters.OutlineFilter(1, 0xFFFFFF)];' Line Number: 4
User prompt
Add a 1 pixel wide, white outline to the player to highlight them and make them stand out
User prompt
Center the background image horizontally. Align the bottom edge with the bottom of the screen
User prompt
Add a background image to the game
User prompt
Fix Bug: 'Uncaught TypeError: window.addEventListener is not a function' in this line: 'window.addEventListener('keydown', handleKeyDown);' Line Number: 108
User prompt
Fix Bug: 'Uncaught TypeError: window.addEventListener is not a function' in this line: 'window.addEventListener('keydown', handleKeyDown);' Line Number: 108
User prompt
There's a bug where the player doesn't move
===================================================================
--- original.js
+++ change.js
@@ -104,10 +104,10 @@
keys.down = false;
break;
}
}
- LK.stage.on('keydown', handleKeyDown);
- LK.stage.on('keyup', handleKeyUp);
+ LK.on('keydown', handleKeyDown);
+ LK.on('keyup', handleKeyUp);
var minions = [];
var enemies = [];
var heroBullets = [];
var enemyBullets = [];
A pixel art sprite in a Super Nintendo, Super Castlevania style where it looks a little gothic/vampire hunter like Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A pixel art large background in a Super Nintendo, Super Castlevania style with an open world like cemetery, 3/4 viewpoint Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. A pixel art sprite in a Super Nintendo, Super Castlevania style that looks like a small pile of bones
Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. A pixel art sprite in a Super Nintendo, Super Castlevania style that looks like a skeleton zombie that is haunched over
Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Pixel art in a SNES style that looks like something from castlevania. A ground explosion effect like something is coming out of the ground
Pixel art in SNES Castlevania style. Red goblin Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Pixel art in SNES Castlevania style. Red goblin