User prompt
Please fix the bug: 'Uncaught TypeError: Cannot set properties of undefined (setting 'fill')' in or related to this line: 'levelText.style.fill = lvlColor;' Line Number: 471
Code edit (5 edits merged)
Please save this source code
User prompt
in updateMenuGrid Fore ach levelText in menuGrid, update the level color depending on puzzleManager.maxReachedLevelNumber
Code edit (3 edits merged)
Please save this source code
User prompt
fix ```levelText.down = function () { log("Tapped level number:", lvl); }; ```to take into account the scope
User prompt
in MenuBoard, add a down event handler on levelText elements and log the tapped level number
Code edit (2 edits merged)
Please save this source code
User prompt
in showWall() animate backgroundWall alpha from 0 to 1
Code edit (5 edits merged)
Please save this source code
User prompt
in cleanMenuState, animate menu exit to the left side
User prompt
in initMenuState, animate menuBoard entrance from the right side
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Timeout.tick error: backgroundWall is not defined' in or related to this line: 'backgroundWall.visible = true;' Line Number: 476
Code edit (1 edits merged)
Please save this source code
Code edit (16 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: resetButton.hide is not a function' in or related to this line: 'resetButton.hide();' Line Number: 1419
Code edit (1 edits merged)
Please save this source code
Code edit (18 edits merged)
Please save this source code
User prompt
add a new MenuButton class and a menuButton global similar to ResetButon and resetButton
Code edit (1 edits merged)
Please save this source code
Code edit (12 edits merged)
Please save this source code
User prompt
Please fix the bug: 'levelText is not defined' in or related to this line: 'menuCell.addChild(levelText);' Line Number: 398
Code edit (1 edits merged)
Please save this source code
User prompt
add a new class MenuBoard that contains a grid of assets named menuGrid. (use a new asset named menuCell)
Code edit (3 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -448,9 +448,11 @@
var isReached = lvl == puzzleManager.maxReachedLevelNumber;
var notReached = lvl > puzzleManager.maxReachedLevelNumber;
var lvlColor = isDone ? 0x6ad100 : 0xF93827;
lvlColor = notReached ? 0x787878 : lvlColor;
- levelText.style.fill = lvlColor;
+ levelText.setStyle({
+ fill: lvlColor
+ });
levelText.alpha = lvl <= puzzleManager.maxReachedLevelNumber ? 1 : 0.6;
}
}
}
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