Code edit (1 edits merged)
Please save this source code
User prompt
pass allNotMoving to tick on grid elements
User prompt
when setting cell.alpha in game, set targetAlpha instead
User prompt
in tick, also animate alpha towards target alpha
User prompt
On cell, add a targetAlpha variable
User prompt
in cell when move is called set isMoving to true
User prompt
Don't run the hue or rotation difference code unless isMoving is false
User prompt
add clockGraphics x and y to indicator x and y
User prompt
add 15 to indicatorDistance
User prompt
we do not need the newCell in mergeConnectedNeighbors anymore remove this creation. Change no other code
User prompt
do not create the newCell in mergeConnectedNeighbors
User prompt
do not make newCell in mergeConnectedNeighbors
User prompt
in mergeConnectedNeighbors when calculating new type use cell.realType
User prompt
when setting type in changeType mod with totalTypes. Do not do this for realType. Leave this alone
User prompt
when setting self.type in changeType mod with totalTypes
User prompt
set self.realType in changeType to newType as well
User prompt
in changeType when setting type mod with totalTypes. do not do this for the variable realType
User prompt
in changeType when setting type mod with totalTypes. do not do this for real type
User prompt
in change type, first set realType to type. Then use realType for targetHue and target Rotation
User prompt
In cell introduce a realType, initialize it initially to the same value as type
User prompt
when calculating newType do not mod with totalTypes
User prompt
in connectedNeighbors when calling changeType re-attach the cell to make sure it renders onto
User prompt
in cell tick, also animate towards target rotation
User prompt
when change type in connectedNeighbors forEach, use the cell method to change type
User prompt
in cell changeType calculate a new targetHue
===================================================================
--- original.js
+++ change.js
@@ -257,8 +257,10 @@
var neighborColRow = self.findCellColRow(neighborCell);
if (neighborColRow) {
if (neighborCell === cell) {
cell.changeType(newType);
+ gridContainer.removeChild(cell);
+ gridContainer.addChild(cell);
return;
}
grid[neighborColRow.col][neighborColRow.row] = null;
neighborCell.isMoving = true;
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.