User prompt
Please fix the bug: 'Script error.' in or related to this line: 'tween(dragNode, {' Line Number: 2170 โช๐ก Consider importing and using the following plugins: @upit/tween.v1, @upit/storage.v1, @upit/tween.v1
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'tween(dragNode, {' Line Number: 2170 โช๐ก Consider importing and using the following plugins: @upit/tween.v1, @upit/storage.v1, @upit/tween.v1
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'tween(dragNode, {' Line Number: 2173 โช๐ก Consider importing and using the following plugins: @upit/tween.v1, @upit/storage.v1, @upit/tween.v1
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'tween(dragNode, {' Line Number: 2173 โช๐ก Consider importing and using the following plugins: @upit/tween.v1, @upit/storage.v1, @upit/tween.v1
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'tween(dragNode, {' Line Number: 2174 โช๐ก Consider importing and using the following plugins: @upit/tween.v1, @upit/storage.v1, @upit/tween.v1
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'tween(dragNode, {' Line Number: 2174 โช๐ก Consider importing and using the following plugins: @upit/tween.v1, @upit/storage.v1, @upit/tween.v1
Code edit (15 edits merged)
Please save this source code
Code edit (25 edits merged)
Please save this source code
Code edit (25 edits merged)
Please save this source code
Code edit (9 edits merged)
Please save this source code
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: 358 โช๐ก Consider importing and using the following plugins: @upit/tween.v1, @upit/storage.v1, @upit/tween.v1
Code edit (6 edits merged)
Please save this source code
User prompt
play bgMusic in loop
Code edit (1 edits merged)
Please save this source code
User prompt
create a new confetti class. use line asset. call it in playFinalAnimation
Code edit (1 edits merged)
Please save this source code
User prompt
add random tint to confettis
Code edit (4 edits merged)
Please save this source code
Code edit (18 edits merged)
Please save this source code
User prompt
in start fadeOut, add a delay in the foreach loop of 100*index for each letter
User prompt
in start fadeOut, add a LK.setTimeout in the foreach loop of 100*index for each letter
===================================================================
--- original.js
+++ change.js
@@ -2000,9 +2000,9 @@
}
}
function handlePlayingStateMove(x, y, obj) {
//log("Handling move event in PLAYING state", dragNode);
- if (dragNode && !isApplyingOperation) {
+ if (dragNode && !isAnimatingDragNode && !isApplyingOperation) {
// Calculate rotation based on x delta
var deltaX = x - dragNode.x; //{71.1}
var rotationFactor = -0.1; // Adjust this factor to control rotation sensitivity//{71.2}
var newRotation = deltaX * rotationFactor; //{71.3}
@@ -2087,9 +2087,9 @@
}
function handlePlayingStateUp(x, y, obj) {
// Implement logic for handling up event in PLAYING state
log("Handling up event in PLAYING state");
- if (dragNode) {
+ if (dragNode && !isAnimatingDragNode) {
// Check if the operation button is above a tile
var tileFound = false;
log("Operation dropped at ", x, y);
log("boardContainer at ", boardContainer.x, boardContainer.y);
@@ -2106,8 +2106,9 @@
if (!applied) {
log("Operation NOT applied. Cancel");
// Exit from loop
log("Restore canceled Operation...");
+ isAnimatingDragNode = true;
tween(dragNode, {
x: dragNode.baseX,
//rightOperationPreselectX,
y: dragNode.baseY,
@@ -2120,8 +2121,9 @@
duration: 500,
easing: tween.easeOut,
onFinish: function onFinish() {
dragNode = null;
+ isAnimatingDragNode = false;
isApplyingOperation = false;
}
});
return;
@@ -2141,8 +2143,9 @@
}); //{4x.1}
if (currentAdjacentTiles) {
resetAdjacentTilesScale();
}
+ isAnimatingDragNode = true;
tween(dragNode, {
alpha: 0
}, {
duration: 500,
@@ -2151,8 +2154,9 @@
if (dragNode) {
log("Destroy used Operation...");
dragNode.destroy();
dragNode = null;
+ isAnimatingDragNode = false;
isApplyingOperation = false;
}
}
});
@@ -2163,14 +2167,17 @@
// Exit from loop
return;
} else {
log("Operation button is NOT above tile at position:", tile.x, tile.y); // Log when operation button is not above a tile
- dragNode = null;
+ if (!isAnimatingDragNode) {
+ dragNode = null;
+ }
}
});
if (!tileFound) {
log("Operation button not above any tile");
LK.getSound('operationCancel').play();
+ isAnimatingDragNode = true;
tween(dragNode, {
x: dragNode.baseX,
//rightOperationPreselectX,
y: dragNode.baseY,
@@ -2180,9 +2187,12 @@
scaleX: 1,
scaleY: 1
}, {
duration: 500,
- easing: tween.easeOut
+ easing: tween.easeOut,
+ onFinish: function onFinish() {
+ isAnimatingDragNode = false;
+ }
});
if (currentAdjacentTiles) {
currentAdjacentTiles.forEach(function (adjTile) {
adjTile.isHighlighted = false;
@@ -2263,8 +2273,9 @@
var rightOperationPreselectY = 2500;
var rightOperationPreselectR = -0.15;
var levelNumberText;
var isApplyingOperation = false;
+var isAnimatingDragNode = false;
var currentHighlightedTile;
var currentAdjacentTiles = []; // Initialize currentAdjacentTiles as a global variable
var showHintsInterval; // Declare showHintsInterval as a global variable
var gameHints; // Declare gameHints as a global variable
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