Code edit (1 edits merged)
Please save this source code
User prompt
in handlePlayingStateUp , if currentAdjacentTiles, restore their scale to 0 with anim
User prompt
in handlePlayingStateMove store adjacentTiles list in a new global 'currentAdjacentTiles'
User prompt
when currentHighlightedTile is set, call getAdjacentTiles then animate their scale to 1.33 too
User prompt
in handlePlayingStateMove, when a tile isHighlighted store it in a new global currentHighlightedTile
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'getAdjacentTiles')' in or related to this line: 'tween(tile, {' Line Number: 710
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'getAdjacentTiles')' in or related to this line: 'tween(tile, {' Line Number: 691
User prompt
add a new function 'getAdjacentTiles' in puzzleManager the take a tile and returns all adjacent tiles with the same value
Code edit (11 edits merged)
Please save this source code
User prompt
in handlePlayingStateMove, Before highlighting, unhighlight other tiles
Code edit (1 edits merged)
Please save this source code
User prompt
don't set dragnode rotation directly but animate ir
Code edit (5 edits merged)
Please save this source code
User prompt
limit dragNode rotation between -0.1 and 0.1 and restore it to zero if deltaX is low
User prompt
during handlePlayingStateMove, Animate dragNode's rotation slightly depending on x delta
Code edit (1 edits merged)
Please save this source code
User prompt
``` tween(self.valueText, { scaleX: scaleRatio, scaleY: scaleRatio }, { duration: 500, easing: tween.easeOut }); ``` for self.valueText doesn't work with scale, try with width and height
Code edit (13 edits merged)
Please save this source code
User prompt
in preselect(), animate the movement and scale
Code edit (1 edits merged)
Please save this source code
Code edit (5 edits merged)
Please save this source code
User prompt
in preselect(), use addChildAt to set the preselected operation front
Code edit (1 edits merged)
Please save this source code
User prompt
in updateOperations, preselect operation at index 0
Code edit (13 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -1059,20 +1059,8 @@
}
function handlePlayingStateUp(x, y, obj) {
// Implement logic for handling up event in PLAYING state
log("Handling up event in PLAYING state");
- if (currentAdjacentTiles) {
- currentAdjacentTiles.forEach(function (adjTile) {
- tween(adjTile, {
- scaleX: 0,
- scaleY: 0
- }, {
- duration: 200,
- easing: tween.easeOut
- });
- });
- currentAdjacentTiles = null; // Clear the list after restoring scale
- }
if (dragNode) {
// Check if the operation button is above a tile
var tileFound = false;
log("Operation dropped at ", x, y);
@@ -1119,8 +1107,20 @@
}, {
duration: 500,
easing: tween.easeOut
});
+ if (currentAdjacentTiles) {
+ currentAdjacentTiles.forEach(function (adjTile) {
+ tween(adjTile, {
+ scaleX: 0,
+ scaleY: 0
+ }, {
+ duration: 200,
+ easing: tween.easeOut
+ });
+ });
+ currentAdjacentTiles = null; // Clear the list after restoring scale
+ }
}
dragNode = null;
}
}
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