User prompt
Please fix the bug: 'TypeError: drawGraphics.moveTo is not a function' in or related to this line: 'drawGraphics.moveTo(player.x, player.y);' Line Number: 60
User prompt
Please fix the bug: 'TypeError: drawGraphics.moveTo is not a function' in or related to this line: 'drawGraphics.moveTo(player.x, player.y);' Line Number: 59
User prompt
Please fix the bug: 'ReferenceError: player is not defined' in or related to this line: 'drawGraphics.moveTo(player.x, player.y);' Line Number: 53
User prompt
Please fix the bug: 'TypeError: drawGraphics.lineStyle is not a function' in or related to this line: 'drawGraphics.lineStyle(2, 0xffd900, 1);' Line Number: 52
User prompt
Please fix the bug: 'TypeError: drawGraphics.setStrokeStyle is not a function' in or related to this line: 'drawGraphics.setStrokeStyle(2, 0xffd900, 1);' Line Number: 52
User prompt
Please fix the bug: 'TypeError: drawGraphics.setStrokeStyle is not a function' in or related to this line: 'drawGraphics.setStrokeStyle(2, 0xffd900, 1);' Line Number: 52
User prompt
Please fix the bug: 'TypeError: drawGraphics.lineStyle is not a function' in or related to this line: 'drawGraphics.lineStyle(2, 0xffd900, 1);' Line Number: 52
User prompt
Please fix the bug: 'ReferenceError: drawGraphics is not defined' in or related to this line: 'drawGraphics.clear();' Line Number: 47
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'update')' in or related to this line: 'self.update = function () {' Line Number: 46
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'update')' in or related to this line: 'self.update = function () {' Line Number: 45
User prompt
Make new asset name it draw make it follow player when moves and draw line
User prompt
make the maze1 behind wall
User prompt
Please fix the bug: 'maze1 is not defined' in or related to this line: 'if (maze1[i][j] == 1) {' Line Number: 40
User prompt
Make the wall on all the yellow lines of the image maze1 with same scale.
User prompt
Add the wall and player to the game
User prompt
Make walls similar as in the image of maze1
User prompt
Make the screen image always smooth and clearer each time of loading the game or new level.
User prompt
Make it 1000x1000 and fit it to the screen
User prompt
Make maze1 the background in the first level1
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: player is not defined' in or related to this line: 'if (player.intersects(wall1a) || player.intersects(wall1b) || player.intersects(wall1c) || player.intersects(wall1d)) {' Line Number: 102
User prompt
Please fix the bug: 'ReferenceError: player is not defined' in or related to this line: 'if (player.intersects(wall1a) || player.intersects(wall1b) || player.intersects(wall1c) || player.intersects(wall1d)) {' Line Number: 102
User prompt
Fix the game
User prompt
Remove second player and reposition the first player again in the bottom middle .
User prompt
Make the respawning of wall1 random with random shapes from anywhere on the side.
/**** * Classes ****/ var Draw = Container.expand(function () { var self = Container.call(this); var drawGraphics = self.attachAsset('draw', { anchorX: 0.5, anchorY: 0.5 }); self.update = function () { drawGraphics.clear(); drawGraphics.lineStyle(2, 0xffd900, 1); drawGraphics.moveTo(player.x, player.y); drawGraphics.lineTo(player.x, player.y); }; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 }); /**** * Game Code ****/ var background = game.addChild(LK.getAsset('maze1', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 })); background.scale.x = game.width / background.width; background.scale.y = game.height / background.height; var draw = game.addChild(new Draw()); var self = void 0; self.update = function () { drawGraphics.clear(); drawGraphics.lineStyle(2, 0xffd900, 1); drawGraphics.moveTo(player.x, player.y); drawGraphics.lineTo(player.x, player.y); };
===================================================================
--- original.js
+++ change.js
@@ -33,8 +33,9 @@
}));
background.scale.x = game.width / background.width;
background.scale.y = game.height / background.height;
var draw = game.addChild(new Draw());
+var self = void 0;
self.update = function () {
drawGraphics.clear();
drawGraphics.lineStyle(2, 0xffd900, 1);
drawGraphics.moveTo(player.x, player.y);