User prompt
In LifeIndicator calculate x position such that lives are centered in the element
User prompt
do not set lifeIndicator.x
User prompt
Fix Bug: 'TypeError: undefined is not an object (evaluating 'lifeIndicator.anchor.set')' in this line: 'lifeIndicator.anchor.set(0.5, 0);' Line Number: 247
User prompt
Add life indicator to topCenter
User prompt
Do not set y of lifeIndicator
User prompt
Show lives as 10 hearts
User prompt
Add a life indicator to the game, that shows that you have 10 lives. This indicator should show below score.
User prompt
initialize totalCellTypes with 4
User prompt
Make totalTypes an argument that is passed to cell
Code edit (3 edits merged)
Please save this source code
User prompt
Move score calculation code to attachCellListeners
User prompt
Score should be increased based on how many nodes exist cellsToDestroy. With bonuses for removing more cells in one click
User prompt
Add a score variable to the game
User prompt
At bottom of tick, if no cells are moving, check if we have any possible moves. If not call resetBoard
User prompt
Remove the endOfRoundCondition if and related endOfRoundCondition variable
User prompt
Fix Bug: 'ReferenceError: Can't find variable: endOfRoundCondition' in this line: 'if (endOfRoundCondition) {' Line Number: 97
User prompt
Fix Bug: 'TypeError: undefined is not an object (evaluating 'self')' in this line: 'self.resetBoard = function () {' Line Number: 81
User prompt
Add the ability for the game to reset the board and start next round
User prompt
set boardBackground alpha to .7ยจ
User prompt
When positing boardBackground subtract half half of cell width and hight
Code edit (1 edits merged)
Please save this source code
User prompt
factor in the boardBackground width and hight when centering it
Code edit (1 edits merged)
Please save this source code
User prompt
After calculating total grid size, use this information to move boardBackground such that it's centered behind the board
User prompt
After calculating total grid size, use this information to center boardBackground on the board.
===================================================================
--- original.js
+++ change.js
@@ -5,11 +5,13 @@
var LifeIndicator = Container.expand(function (initialLives) {
var self = Container.call(this);
self.lives = initialLives;
self.hearts = [];
+ var totalWidth = self.lives * (heart.width + 10) - 10;
+ var startX = (2048 - totalWidth) / 2;
for (var i = 0; i < self.lives; i++) {
var heart = self.createAsset('heart', 'Life Heart', 0.5, 0.5);
- heart.x = i * (heart.width + 10);
+ heart.x = startX + i * (heart.width + 10);
self.hearts.push(heart);
self.addChild(heart);
}
self.updateLives = function (lives) {
Cartoon Christmas decoration Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cartoon Christmas candy cane Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cartoon Christmas stocking Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cartoon Christmas yellow starr Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cartoon Christmas ornament Blue Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cartoon Christmas snow flake. Blue Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cartoon Christmas outdoor scene. Forest, northern lights. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
White square. Narrow round corners. Background element. Flat. Vector. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cartoon Christmas heart Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Simple Cartoon Christmas particle. White. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cartoon Christmas ornament yellow and purple Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cartoon Christmas snow man head. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Simple Cartoon Christmas wreath. Purple Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.