Code edit (21 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'cellW')' in or related to this line: 'var cX = (Math.floor(input.x / 100) + centerDeltaX + building.cellW / 2 + Math.floor(building.cellW / 2) - 5) * 100;' Line Number: 1100
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (15 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'self.addChild(unit.asset);' Line Number: 1241
Code edit (2 edits merged)
Please save this source code
User prompt
Fix Bug: 'Timeout.tick error: viewSize is not defined' in or related to this line: 'var screenX = (self.cellX - gameMap.currentViewCenter.x + viewSize) * self.asset.width;' Line Number: 452
Code edit (1 edits merged)
Please save this source code
Code edit (3 edits merged)
Please save this source code
User prompt
in render, concat player2 units to allUnits
User prompt
in render implement the loop that renders units
Code edit (4 edits merged)
Please save this source code
User prompt
I found the bug of unit not moving : unit is rendered in the render() function at the cell coordinates so the updateMovement changes are ignored. Fix the render function
Code edit (2 edits merged)
Please save this source code
User prompt
add the call updateMovement
Code edit (3 edits merged)
Please save this source code
User prompt
add the call to updateMovement
User prompt
rework moveUnit to use a delta and a continuous movement
Code edit (1 edits merged)
Please save this source code
Code edit (8 edits merged)
Please save this source code
User prompt
In moveActionLogic move the unit to the destination
User prompt
In handleDragEnd, when SET_ORDER_TARGET Use unit actions and handler instead of ‘actionHandler’
User prompt
In handleDragEnd, when SET_ORDER_TARGET call corresponding the action handler of the unit
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -1216,8 +1216,10 @@
console.log("render unit " + unit.name, unit.x, unit.y);
// Ensure the unit is added to the game container, not 'self' which is not defined in this context
if (!unit.asset.parent) {
game.addChild(unit.asset);
+ } else {
+ game.addChild(unit.asset);
}
});
}
});
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