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
@@ -1704,8 +1704,9 @@
var flowers = [];
var waterDropInterval;
var logo;
var puzzleManager;
+var isLogoAnimFinished = false;
// Initialize the game
initializeGame();
/****
* Helper Functions
@@ -1896,9 +1897,9 @@
fill: 0x111111,
weight: 1000,
dropShadow: false
});
- levelText.x = 2048 / 2 - 100;
+ levelText.x = 2048 / 2 - 50;
levelText.y = 250;
levelText.anchorX = 0.5;
levelText.blendMode = 3;
levelText.visible = false;
@@ -1965,19 +1966,35 @@
}, {
duration: 1000,
easing: function easing(t) {
return t * (2 - t);
- } // Simple ease-out function
+ },
+ // Simple ease-out function
+ onFinish: function onFinish() {
+ isLogoAnimFinished = true;
+ }
});
}
function handleMenuLoop() {}
function cleanMenuState() {
if (logo) {
- logo.visible = false;
- game.removeChild(logo);
+ tween(logo, {
+ x: -logo.width
+ }, {
+ // Animate logo out to the left
+ duration: 1000,
+ // Duration of 1 second
+ easing: tween.easeInOut,
+ // Easing function for smooth animation
+ onFinish: function onFinish() {
+ logo.visible = false; // Hide logo after animation
+ game.removeChild(logo); // Remove logo from game
+ }
+ });
}
}
function initNewRoundState() {
+ log("Entering New Round State");
// Create and add backgroundPlaying1 to backgroundLayer
var backgroundPlaying1 = LK.getAsset('backgroundPlaying1', {
anchorX: 0.5,
anchorY: 0.5
@@ -1985,17 +2002,17 @@
backgroundPlaying1.x = 2048 / 2;
backgroundPlaying1.y = 2732 / 2;
backgroundLayer.addChild(backgroundPlaying1);
// Reset puzzle manager for new round
- log("Entering New Round State");
if (puzzleManager) {
puzzleManager.initPuzzle();
}
// Show gridBoard
gridBoardSoil.visible = true;
gridBoard.visible = true;
levelText.visible = true;
- levelText.text = puzzleManager.currentLevel;
+ levelText.setText(puzzleManager.currentLevel);
+ console.log("Levels is now ", puzzleManager.currentLevel);
// After a short delay, transition to PLAYING state
LK.setTimeout(function () {
changeGameState(GAME_STATE.PLAYING);
}, 1000);
@@ -2105,8 +2122,11 @@
/****
* Event Handlers
****/
game.down = function (x, y, obj) {
+ if (!isLogoAnimFinished) {
+ return;
+ }
switch (currentState) {
case GAME_STATE.MENU:
changeGameState(GAME_STATE.NEW_ROUND);
break;
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