User prompt
Apply all damage the logic used in Building for Unit
Code edit (18 edits merged)
Please save this source code
User prompt
in displayActionItems, don't show actions if unit isn't of player 1
User prompt
in prepareMap, spawn a Quad for player 2 next to its ConstructionYard
Code edit (1 edits merged)
Please save this source code
User prompt
in Building damage place the asset 'buildingExplosion' at the center of the building
Code edit (1 edits merged)
Please save this source code
User prompt
in Building damage show the asset 'buildingExplosion' on the building with size 1x1 then animate it growing until 220x220 before removing the building.
User prompt
LK.effects.flashObject(self, 0xff0000, 500); doesn't work. fix it
User prompt
in th Building damage function, add a red flash when hit
Code edit (1 edits merged)
Please save this source code
User prompt
Unit keep Firing at target even after it's destroyed! fix it
Code edit (2 edits merged)
Please save this source code
User prompt
in Building damage, Remove building from the gameMap cells
User prompt
the log indicates "Building Construction Yard destroyed" but it is still visible ! fix this
User prompt
in Building damage function, game.removeChild(self); seems wrong. fix it
User prompt
in calculateAngle, add 90° to the result
Code edit (1 edits merged)
Please save this source code
User prompt
in Building class, retrieve health from BuildableRepository instead of fixed value 99
Code edit (4 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: destinationX is not defined' in or related to this line: 'console.log("AttackActionLogic...", destinationX, ',', destinationY);' Line Number: 1210
Code edit (1 edits merged)
Please save this source code
User prompt
implement the function calculateAngle
Code edit (1 edits merged)
Please save this source code
User prompt
implement the calculateDistance function
===================================================================
--- original.js
+++ change.js
@@ -220,10 +220,12 @@
console.log("Building " + self.name + " destroyed");
var explosion = self.attachAsset('buildingExplosion', {
anchorX: 0.5,
anchorY: 0.5,
- width: 100,
- height: 100
+ x: self.x + self.cellW * tileSize / 2,
+ y: self.y + self.cellH * tileSize / 2,
+ width: 1,
+ height: 1
});
var growExplosion = function growExplosion(size) {
if (size < 2200) {
explosion.width = size;
a tileable sand terrain tile.
A square tileable rock terrain tile WITHOUT BBORDER. Single Game Texture. In-Game asset. 2d. No shadows. No Border
Zenith view of Dune's Wind Trap power facility square fence. Ressembles a bit to Sydney's Opera. Zenith view Directly from above.
grey cancel icon. UI
thin white circle empty.
0x5e86ff
Zenith view of a white rectangular Harvester shape of a garbage truck with a triangular head. Harvesting on sand, with flowing spice in the back. inside a square fence. Zenith view. Directly overhead. Plumb view.
Minimal Ui icon of an right sign aside with an icon of a target. sand background
Minimal icon of a home with direction icon pointing to the home. sand background
3 white flat isometric concentric circles like a target.
Remove background
Gray background
Minimal Ui icon of target sign on a fire icon.. sand background
top view of an explosion effect.
Simple heavy army tank factory buiding a tank with a crane. Square fence... Zenith view Directly overhead. Plumb view.
an empty black popup UI. UI