User prompt
Fix Bug: 'Timeout.tick error: LK.dispatchEvent is not a function' in this line: 'LK.dispatchEvent('bulletFired', bullet);' Line Number: 35
User prompt
When the battle is start, the red soldier shoot the blue soldier and the blue soldier shoot the red soldier
User prompt
Fix Bug: 'Timeout.tick error: CustomEvent is not a constructor' in this line: 'LK.dispatchEvent(new CustomEvent('bulletFired', {' Line Number: 32
User prompt
Fix Bug: 'Timeout.tick error: Cannot read properties of undefined (reading 'push')' in this line: 'self.parent.bullets.push(bullet);' Line Number: 32
User prompt
when the battle start, the soldiers shoot bullet at each other
User prompt
soldier shoot bullet
User prompt
fix the code
User prompt
Fix Bug: 'TypeError: Cannot set properties of undefined (setting 'move')' in this line: 'self.move = function () {};' Line Number: 18
User prompt
Fix Bug: 'TypeError: Cannot set properties of undefined (setting 'startFighting')' in this line: 'self.startFighting = function () {' Line Number: 24
User prompt
Fix Bug: 'TypeError: Cannot set properties of undefined (setting 'startFighting')' in this line: 'self.startFighting = function () {' Line Number: 24
User prompt
Fix Bug: 'TypeError: Cannot set properties of undefined (setting 'startFighting')' in this line: 'self.startFighting = function () {' Line Number: 24
User prompt
Fix Bug: 'TypeError: Cannot set properties of undefined (setting 'move')' in this line: 'self.move = function () {};' Line Number: 18
User prompt
Fix Bug: 'TypeError: Cannot set properties of undefined (setting 'move')' in this line: 'self.move = function () {};' Line Number: 18
User prompt
Fix Bug: 'TypeError: Cannot set properties of undefined (setting 'startFighting')' in this line: 'self.startFighting = function () {' Line Number: 24
User prompt
Fix Bug: 'TypeError: Cannot set properties of undefined (setting 'move')' in this line: 'self.move = function () {};' Line Number: 18
User prompt
Fix Bug: 'TypeError: Cannot set properties of undefined (setting 'move')' in this line: 'self.move = function () {};' Line Number: 18
User prompt
Fix Bug: 'TypeError: Cannot set properties of undefined (setting 'move')' in this line: 'self.move = function () {};' Line Number: 18
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'createAsset')' in this line: 'var soldierGraphics = self.createAsset('blueSoldierImage', 'Blue Soldier Graphics', .5, .5);' Line Number: 18
User prompt
Fix Bug: 'TypeError: soldier.startFighting is not a function' in this line: 'soldier.startFighting();' Line Number: 49
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'on')' in this line: 'startBattleButton.on('down', function () {' Line Number: 33
User prompt
when the start button is clicke, the battle start and when the battle start, the soldier start fighting against the other team
User prompt
dont spawn solder closer to 400 pixel to the start button
User prompt
Dont spawn soldier on the start button position
User prompt
move the start button 400 pixel down
User prompt
move the start battle 800 pixel down
===================================================================
--- original.js
+++ change.js
@@ -31,9 +31,11 @@
bullet.x = self.x;
bullet.y = self.y - self.height / 2;
bullet.targetTeam = targetTeam;
self.parent.addChild(bullet);
- LK.dispatchEvent('bulletFired', bullet);
+ LK.emit('bulletFired', {
+ detail: bullet
+ });
};
});
var BlueSoldier = Container.expand(function () {
var self = Container.call(this);
a big plain show from the top with a line right at the center of the plain to the top from the botom Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a blue toy soldier Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a red toy soldier Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A start Battle button Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A blue soldier toy Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A red soldier toy Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a bullet in an anime style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.