Code edit (3 edits merged)
Please save this source code
User prompt
add a new global showHintsInterval; then use it to delay gameHints.showHint1(); call by 1 sec
Code edit (21 edits merged)
Please save this source code
Code edit (4 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Timeout.tick error: isEnabled is not defined' in or related to this line: 'if (isEnabled) {' Line Number: 985
Code edit (5 edits merged)
Please save this source code
User prompt
in handlePlayingStateUp, find a way to exit the `puzzleManager.board.forEach` loop when operation is applied to a tile because `return`doesn't seem to work
Code edit (10 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of null (reading 'type')' in or related to this line: 'var newValue = Math.max(0, currentTile.value + parseInt(operation.type));' Line Number: 1541
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: 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
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
===================================================================
--- original.js
+++ change.js
@@ -729,8 +729,9 @@
blendMode: 1
});
self.down = function () {
self.interactive = false;
+ log("MenuButton Down...");
puzzleManager.reset(true);
LK.getSound("resetSound").play();
resetButton.deactivate();
menuBoard.updateMenuGrid();
@@ -887,8 +888,9 @@
});
// ResetButton class to represent the reset button
var ResetButton = Container.expand(function () {
var self = Container.call(this);
+ self.isEnabled = false;
// Asset Attachments
var buttonShadow = self.attachAsset('resetButton', {
anchorX: 0.5,
anchorY: 0.5,
@@ -922,8 +924,9 @@
puzzleManager.reset(); // Reset the level puzzle
};
self.disable = function () {
log("Reset button disable...");
+ self.isEnabled = false;
buttonGraphics.alpha = 0.5; // Dim the button to indicate it's disabled
self.interactive = false; // Disable interaction
tween(self, {
scaleX: 0.8,
@@ -934,8 +937,9 @@
});
};
self.enable = function () {
log("Reset button enable...");
+ self.isEnabled = true;
buttonGraphics.alpha = 1.0; // Restore full opacity to indicate it's enabled
self.interactive = true; // Enable interaction
tween(self, {
scaleX: 1.0,
@@ -954,15 +958,18 @@
}, {
duration: 500,
easing: tween.easeOut
});
+ if (isEnabled) {
+ self.enable();
+ }
};
self.deactivate = function () {
log("Reset button deactivate...");
tween(self, {
y: -300
}, {
- duration: 500,
+ duration: 300,
easing: tween.easeOut,
onFinish: function onFinish() {
log("Reset button deactivate : hiding");
self.visible = false;
@@ -1751,16 +1758,16 @@
}
function initPlayingState() {
// Initialize the game state for PLAYING
log("Initializing PLAYING State");
- resetButton.disable();
- resetButton.activate(); // Make resetButton visible in PLAYING state
if (puzzleManager.currentLevel == 1) {
showHintsInterval = LK.setTimeout(function () {
gameHints.showHint1();
}, 2000);
}
LK.setTimeout(function () {
+ //resetButton.disable();
+ resetButton.activate(); // Make resetButton visible in PLAYING state
menuButton.activate();
}, 3000);
}
function handlePlayingLoop() {
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