User prompt
make score text use impact, and add a black dropshadow
User prompt
Add a score to the game, add one point to score each time you successfully remove a stack
Code edit (2 edits merged)
Please save this source code
User prompt
when calculating newStack.targetY use (row-1)
User prompt
when creating a new stack in tick, the targetY variable should be such that the targetY is the y of where the stack will end up being in the grid
User prompt
For stacks created in tick, set y to -(hight of stack). However set targetY such that it's the same value as now
User prompt
For stacks created in tick, set y to -(hight of stack)
User prompt
When moving stacks, if the empty spot is now in the top row, insert a new stack here
Code edit (1 edits merged)
Please save this source code
User prompt
in tick, call .move on all stacks
User prompt
add a move method to stack, which animates the y of the stack to targetY if they are different
User prompt
when initializing stacks in game, set both y and targetY to the same value
User prompt
When removing a stack, you're setting y, set targetY instead. Also make this a property on stack
User prompt
In tick, in a separate full loop of the stacks array. If an array element is null, move the stack above this empty spot into it's spot.
User prompt
for each tick, loop the stacks array. If a spot is empty, and a stack exist in the spot above the empty element, move the stack above down.
User prompt
in checkRings also verify that ring[0] has size zero
User prompt
in checkRings also verify that the rings have the same size as the index of the rings array
User prompt
Only remove stack if ring sizes are in the order of 0,1,2,3,4
User prompt
when setting ring graphics scale x in ring, replace self.type with size
User prompt
In ring scale, use size
User prompt
In ring, rename the constructor argument type to size. Also update the this.type = type line to self.size = size
User prompt
Your setting self.type twice in ring, delete the first instance
User prompt
In ring rename the constructor argument type to size
User prompt
In ring type should be set to the random value used to select color
User prompt
in Ring, rename the constructor argument type to size
===================================================================
--- original.js
+++ change.js
@@ -13,8 +13,9 @@
self.targetY = self.y;
self.move = function () {
if (self.y !== self.targetY) {
if (Math.abs(self.y - self.targetY) < 1) {
+ console.log(1);
self.y = self.targetY;
} else {
self.y += (self.targetY - self.y) / 10;
}
Amazing games background for wooden children’s rainbow stacking tower game.
Horizontal wooden rod. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Narrow Horizontal rod. Light wood Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.