Code edit (7 edits merged)
Please save this source code
User prompt
in cleanMenuState, animate the logo out to the left
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: tween is not defined' in or related to this line: 'tween(movingTile, {' Line Number: 1611 ↪💡 Consider importing and using the following plugins: @upit/tween.v1
Code edit (10 edits merged)
Please save this source code
User prompt
Ignore clicks before end of logo animation. use a global variable to track the enf of the anim
User prompt
Ignore clicks before end of logo animation
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (8 edits merged)
Please save this source code
User prompt
add a random rotation to flowers when spawning
Code edit (2 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: finalScaleX is not defined' in or related to this line: 'if (flowerGraphics.scaleX < finalScaleX) {' Line Number: 62
User prompt
also when spawning Flower, make them grow in size from 0 to their final size
User prompt
when spawning Flower, make them fade in with an alpha anim from 0 to 1, (don't use tween for that)
Code edit (7 edits merged)
Please save this source code
User prompt
when spawning Flower, make them fade in with an alpha anim from 0 to 1
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -358,9 +358,10 @@
self.flow = false;
self.startFlowTicks = 0;
self.baseTint = 0xaaaaaa;
self.baseTintLight = 0xaaaaaa;
- self.maxWaterSize = 250;
+ self.maxWaterSize = 270;
+ self.maxWaterCornerSize = 180;
self.flowSpeed = 12;
self.pipeContainer = new Container();
//self.addChild(self.pipeContainer);
self.createStartPipe = function () {
@@ -822,27 +823,31 @@
}
};
self.updateCornerPipe = function () {
var progress = (LK.ticks - self.startFlowTicks) * self.flowSpeed;
- var thirdSize = self.maxWaterSize / 3;
+ var thirdSize = self.maxWaterCornerSize / 3;
+ var upRot = Math.abs(self.pipeContainer.rotation) % (2 * Math.PI) < 0.1 || Math.abs(self.pipeContainer.rotation - Math.PI / 2) % (2 * Math.PI) < 0.1;
+ var normalOrder = upRot || self.pipeContainer.dir == 'bt' || self.pipeContainer.dir == 'rl';
+ log("updateCornerPipe: Choosing order for tile:", self.pipeContainer.rotation, self.pipeContainer.dir);
+ log("upRot=", upRot, " (0 or PI/2) / dir=", self.pipeContainer.dir);
if (progress < thirdSize) {
// 0 or PI/2
- if (Math.abs(self.pipeContainer.rotation) % (2 * Math.PI) < 0.1 || Math.abs(self.pipeContainer.rotation - Math.PI / 2) % (2 * Math.PI) < 0.1) {
- self.updateCornerPipeFirstPhase(progress, thirdSize);
+ if (normalOrder) {
+ self.updateCornerPipeFirstPhase(progress, thirdSize, false);
} else {
self.updateCornerPipeThirdPhase(progress, thirdSize, true);
}
} else if (progress < thirdSize * 2) {
//self.updateCornerPipeSecondPhase(progress, thirdSize);
} else {
// 0 or PI/2
- if (Math.abs(self.pipeContainer.rotation) % (2 * Math.PI) < 0.1 || Math.abs(self.pipeContainer.rotation - Math.PI / 2) % (2 * Math.PI) < 0.1) {
- self.updateCornerPipeThirdPhase(progress, thirdSize);
+ if (normalOrder) {
+ self.updateCornerPipeThirdPhase(progress, thirdSize, false);
} else {
self.updateCornerPipeFirstPhase(progress, thirdSize, true);
}
}
- if (progress >= self.maxWaterSize) {
+ if (progress >= self.maxWaterCornerSize) {
self.flow = false;
}
};
self.updateCornerPipeFirstPhase = function (progress, thirdSize, reverted) {
@@ -899,12 +904,12 @@
}
// PI
if (Math.abs(self.pipeContainer.rotation - Math.PI) % (2 * Math.PI) < 0.1) {
log("updateCornerPipeThirdPhase: Case PI");
- self.waterH.rotation = (self.pipeContainer.rotation + Math.PI / 2) % (2 * Math.PI);
+ //self.waterH.rotation = (self.pipeContainer.rotation + Math.PI / 2) % (2 * Math.PI);
+ self.waterH.rotation = (reverted ? self.pipeContainer.rotation - Math.PI / 2 : self.pipeContainer.rotation + Math.PI / 2) % (2 * Math.PI);
self.waterH.y = -140;
self.waterH.x = 0;
- //self.waterH.rotation = reverted ? Math.PI / 2 : -Math.PI / 2;
self.waterH.tint = 0xFF0000;
}
// 3*PI/2
if (Math.abs(self.pipeContainer.rotation - 3 * Math.PI / 2) % (2 * Math.PI) < 0.1) {
@@ -913,8 +918,10 @@
// P/2 =>
// PI =>
// 0 =>
self.waterH.rotation = (self.pipeContainer.rotation + Math.PI) % (2 * Math.PI);
+ self.waterH.y = -80;
+ self.waterH.x = 0;
self.waterH.tint = 0x00FF00;
}
log("updateCornerPipeThirdPhase: waterH rotation is:", self.waterH.rotation);
}
@@ -1334,8 +1341,24 @@
log("Set water direction to 'rl' (Right to Left)");
}
}
}
+ if (nextTile.type === TileFormat.TYPES.CORNER) {
+ // For corner store water dir in pipeContainer
+ if (Math.abs(incomingDirection - Math.PI / 2) < 0.1) {
+ nextTile.pipeContainer.dir = 'tb'; // Top to Bottom
+ log("Set Corner water direction to 'tb' (Top to Bottom)");
+ } else if (Math.abs(incomingDirection + Math.PI / 2) % (2 * Math.PI) < 0.1) {
+ nextTile.pipeContainer.dir = 'bt'; // Bottom to Top
+ log("Set Corner water direction to 'bt' (Bottom to Top)");
+ } else if (Math.abs(incomingDirection - Math.PI) < 0.1) {
+ nextTile.pipeContainer.dir = 'lr'; // Left to Right
+ log("Set Corner water direction to 'lr' (Left to Right)");
+ } else {
+ nextTile.pipeContainer.dir = 'rl'; // Right to Left
+ log("Set Corner water direction to 'rl' (Right to Left)");
+ }
+ }
if (nextTile.type === TileFormat.TYPES.END) {
log("Found path to end!");
// Start reconstruction from the end position
self.solutionPath = [];
@@ -2199,9 +2222,9 @@
tile.updatePosition(row, col);
return tile;
}
var levelConfigs = {
- 0: [["M-V-0", "F-C-2", "F-C-3", ""], ["M-C-1", "M-V-0", "F-V-0", "F-E-0"], ["F-S-0", "", "", "F-C-0"], ["F-C-1", "", "", "M-C-0"]],
+ 0: [["", "F-C-2", "M-H-0", "M-C-3"], ["", "F-E-2", "M-V-0", ""], ["", "", "", "F-V-0"], ["", "", "", "F-S-2"]],
// Level 1
1: [["F-S-0", "", "", ""], ["F-V-0", "", "", ""], ["F-V-0", "", "M-H-0", ""], ["F-C-1", "F-H-0", "", "F-E-1"]],
// Level 2
2: [["", "M-V-0", "F-E-0", ""], ["", "M-C-0", "F-V-0", ""], ["", "", "", ""], ["F-S-3", "F-H-0", "", ""]],
straigth zenith view square light wooden pallet. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
straigth zenith view square wooden pallet with big screws in each corner Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
simple yellow rating star. Modern video game style
tileSlide
Sound effect
levelWon
Sound effect
tileBlocked
Sound effect
fountain
Sound effect
waterInPipe
Sound effect
bgMusic
Music
logoBounce
Sound effect
levelStart
Sound effect
bgMusic2
Music
flowerPop
Sound effect
roundResult
Sound effect
gameWon
Sound effect
resetSound
Sound effect
birds
Sound effect
birds2
Sound effect
birds3
Sound effect