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
User prompt
in StartButton fadeOut, apply the same animation as for tile setValue to 0 to each letterGraphics
User prompt
in StartButton, use a container for each letter, add tileGraphics and letterText as children of this container then add the container to self.letterGraphics
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
in StartButton, add 5 new texts similars to startText for each letter of the word "START"
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Timeout.tick error: levelText is not defined' in or related to this line: 'levelText.setText("?");' Line Number: 1149
Code edit (21 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Timeout.tick error: levelText is not defined' in or related to this line: 'levelText.setText("?");' Line Number: 1145
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (11 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: 235
===================================================================
--- original.js
+++ change.js
@@ -352,9 +352,9 @@
var self = Container.call(this);
self.menuGrid = [];
// Define grid dimensions
var rows = 7;
- var cols = 5;
+ var cols = 6;
var cellSize = LK.getAsset('menuCell', {}).width;
// Create grid of menuCell assets
for (var row = 0; row < rows; row++) {
self.menuGrid[row] = [];
@@ -366,21 +366,34 @@
y: cellSize / 2 + row * cellSize,
scaleX: col % 2 ? 1 : -1,
scaleY: row % 2 ? 1 : -1
});
- var levelText = new Text2(col + cols * row + 1, {
- size: 160,
- fill: 0xEAEEE8,
- weight: 1000,
- dropShadow: true,
- dropShadowAngle: Math.PI,
- dropShadowDistance: 10
- });
- menuCell.addChild(levelText);
self.menuGrid[row][col] = menuCell;
self.addChild(menuCell);
}
}
+ // Create grid of menuCell assets
+ for (var row = 0; row < rows; row++) {
+ self.menuGrid[row] = [];
+ for (var col = 0; col < cols; col++) {
+ if (row >= 1 && col < 6) {
+ var lvl = col + (cols - 1) * (row - 1) + 1;
+ lvl = lvl < 10 ? "0" + lvl : lvl;
+ var levelText = new Text2(lvl, {
+ size: 160,
+ fill: tileColors[1],
+ //0xEAEEE8,
+ weight: 1000,
+ dropShadow: true,
+ dropShadowAngle: Math.PI,
+ dropShadowDistance: 10
+ });
+ levelText.x = col * cellSize * 1.0 + cellSize / 2 - 80;
+ levelText.y = row * cellSize * 1.0;
+ self.addChild(levelText);
+ }
+ }
+ }
return self;
});
// OperationButton class to represent each operation button
var OperationButton = Container.expand(function (type, index) {
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