User prompt
You crate bottomTilesContainer twice, delete the second version. Rewrite the next line as well to make sure you delete the right version
User prompt
bottomTilesContainer should be created and attached before setMergeMode is created
Code edit (1 edits merged)
Please save this source code
User prompt
after defining bottomTilesContainer attach it to self
User prompt
Where you do var bottomTilesContainer = new Container(); self.addChild(bottomTilesContainer); delete var bottomTilesContainer = new Container(); as it's already defined
User prompt
Move var bottomTilesContainer = new Container(); to before self.setMergeMode =
User prompt
Fix Bug: 'TypeError: undefined is not an object (evaluating 'bottomTilesContainer.alpha = mode ? 0.4 : 1')' in this line: 'bottomTilesContainer.alpha = mode ? 0.4 : 1;' Line Number: 220
User prompt
In self.setMergeMode set bottomTilesContainer alpha to .4 if mergeMode is true otherwise set it to 1
User prompt
in tick use setMergeMode instead of setting the value direclty
User prompt
In the code, rather than setting mergeMode directly call setMergeMode
User prompt
add a new convenience method to game that sets mergeMode to true or false
Code edit (4 edits merged)
Please save this source code
User prompt
In game, add a new container for bottom tile elements. Just use a simple container
User prompt
Set highscore text to 24272b with a white drop shadow
User prompt
In cell set the s component of hsv to .25
Code edit (1 edits merged)
Please save this source code
User prompt
before calling self.processMergeAndGameOver(true); in tick. Move all cells from toMerge to toTest
User prompt
when calling processMergeAndGameOver inside the allNotMoving test, set force to true
User prompt
add a force property to processMergeAndGameOver
User prompt
set score color to 96bfc8
User prompt
In the if (self.mergeMode) { test in processMergeAndGameOver set alpha to .4
User prompt
In the if (self.mergeMode) { test in processMergeAndGameOver set alpha to .3
User prompt
in tick, before calling processMergeAndGameOver set all elements of grid (not bggrid) alpha to 1
User prompt
only run the grid.forEach(function (row) { code in processMergeAndGameOver if mergeMode is true
User prompt
at the bottom of processMergeAndGameOver, inside the if (!isAnyRowMoving && !self.mergeMode) { test set the alpha on all grid (not bggrid) elements that does not belong to toMerge to .5
===================================================================
--- original.js
+++ change.js
@@ -410,8 +410,9 @@
bgCell.setAlphaAndTint(1, 0xFFFFFF);
});
};
LK.on('tick', function () {
+ console.log(bottomTilesContainer);
if (toDelete.length > 0) {
var allNotMoving = toDelete.every(function (cell) {
return !cell.isMoving;
});
Simple White square round corners. Vector. No details. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Background for relaxing puzzle game. Pastel colors, flat shaded, vector art. Flowers. Blocks. Relaxing. Clouds Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Simple White square round corners. Vector. No details. Single Game Texture. In-Game asset. 2d. White background. High contrast. No shadows.
Simple black arrow pointing up. Mouse cursor like.