User prompt
during drag, highlight target tile by making it bigger, restore its size when moving out from it
Code edit (1 edits merged)
Please save this source code
User prompt
in Tiles setValue(), enclose operation in a LK.setTimeout with delay proportional to depth
Code edit (11 edits merged)
Please save this source code
User prompt
in propagateOperation, keep track of the propagation depth and pass it as and additional argument to currentTile.setValue()
User prompt
Please fix the bug: 'Timeout.tick error: Error: Invalid color format. Expected 0xRRGGBB format, received: undefined' in or related to this line: 'tween(tileGraphics, {' Line Number: 122
User prompt
Please fix the bug: 'Timeout.tick error: Error: Invalid color format. Expected 0xRRGGBB format, received: undefined' in or related to this line: 'tween(tileGraphics, {' Line Number: 122
User prompt
Please fix the bug: 'Timeout.tick error: Error: Invalid color format. Expected 0xRRGGBB format, received: undefined' in or related to this line: 'tween(tileGraphics, {' Line Number: 122
User prompt
Please fix the bug: 'Timeout.tick error: Error: Invalid color format. Expected 0xRRGGBB format, received: undefined' in or related to this line: 'tween(tileGraphics, {' Line Number: 122
User prompt
Please fix the bug: 'Uncaught TypeError: setTimeout is not a function' in or related to this line: 'setTimeout(function () {' Line Number: 304
User prompt
when calling ``` // Apply operation currentTile.setValue(currentTile.value + parseInt(operation.type)); log("Applied operation. New value:", currentTile.value); currentTile.playOperationEffect(); ``` delay the calls depending on the propagation depth to create a progressive propagation effect
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
when a tile value become 0, animate its shrink to a 0 size
Code edit (2 edits merged)
Please save this source code
User prompt
when tile value is 0 don't display "0" but ""
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'self.fillTilesNeighbors is not a function' in or related to this line: 'break;' Line Number: 486
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'self.fillTilesNeighbors is not a function' in or related to this line: 'self.fillTilesNeighbors();' Line Number: 210
User prompt
create a new function in puzzle manager to fill tiles neighbors. call it in loadLevel after createBoard()
User prompt
after creating the board, fill tiles neighbors
User prompt
add detailed log (with log()) in propagateOperation
User prompt
When updating a tile value after a drop, also update the tile color with anim
User prompt
Please fix the bug: 'TypeError: Cannot read properties of null (reading 'destroy')' in or related to this line: 'dragNode.destroy();' Line Number: 569
===================================================================
--- original.js
+++ change.js
@@ -116,9 +116,9 @@
}, {
duration: 500,
easing: tween.easeOut
});
- }, depth * 500); // Delay proportional to depth
+ }, depth * 150); // Delay proportional to depth
};
return self;
});
// OperationButton class to represent each operation button
@@ -594,8 +594,31 @@
//log("Handling move event in PLAYING state", dragNode);
if (dragNode) {
dragNode.x = x;
dragNode.y = y;
+ puzzleManager.board.forEach(function (tile) {
+ if (x >= boardContainer.x + tile.x - tile.width / 2 && x <= boardContainer.x + tile.x + tile.width / 2 && y >= boardContainer.y + tile.y - tile.height / 2 && y <= boardContainer.y + tile.y + tile.height / 2) {
+ if (!tile.isHighlighted) {
+ tile.isHighlighted = true;
+ tween(tile, {
+ scaleX: 1.2,
+ scaleY: 1.2
+ }, {
+ duration: 200,
+ easing: tween.easeOut
+ });
+ }
+ } else if (tile.isHighlighted) {
+ tile.isHighlighted = false;
+ tween(tile, {
+ scaleX: 1,
+ scaleY: 1
+ }, {
+ duration: 200,
+ easing: tween.easeOut
+ });
+ }
+ });
}
//log("Handling move event in PLAYING state");
}
function handlePlayingStateUp(x, y, obj) {
tick
Sound effect
tileEntrance
Sound effect
tileRemove
Sound effect
operationSelect
Sound effect
operationCancel
Sound effect
tileChangeValue
Sound effect
resetSound
Sound effect
levelFailed
Sound effect
menuLevelSelect
Sound effect
menuCellEnter
Sound effect
applause
Sound effect
bgMusic
Music
tada
Sound effect