Code edit (9 edits merged)
Please save this source code
User prompt
Fix Bug: 'Timeout.tick error: Cannot read properties of undefined (reading 'destroy')' in or related to this line: 'confetti.destroy();' Line Number: 353
Code edit (1 edits merged)
Please save this source code
User prompt
make confetti rotation random
Code edit (1 edits merged)
Please save this source code
User prompt
fix the conffetti colors not applying
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'Timeout.tick error: game.getChildByName is not a function' in or related to this line: 'if (profit > 0 && !game.getChildByName('confetti')) {' Line Number: 333
User prompt
Confettiis called to much times
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'Timeout.tick error: confettiColors is not defined' in or related to this line: 'var particle = self.addChild(LK.getAsset('segment', {' Line Number: 265
User prompt
in Confetti Change the ' Math.random() * 0xFFFFFF,' , use an array of colors instead
Code edit (1 edits merged)
Please save this source code
User prompt
add a conffeti animation and call it in gameResult if profit > 0
Code edit (13 edits merged)
Please save this source code
User prompt
after liquidate update balanceText and stocksNumber
Code edit (7 edits merged)
Please save this source code
User prompt
if profit is >0 set profitText color to green
Code edit (1 edits merged)
Please save this source code
Code edit (6 edits merged)
Please save this source code
User prompt
add a function liquidate() to player object and call it in gameResult
Code edit (1 edits merged)
Please save this source code
User prompt
in the gameResult display a Text with the final balance
Code edit (8 edits merged)
Please save this source code
User prompt
when hasFinished call a gameResult function. in this function show a 'popup' asset at the center of the screen then call GameOver
===================================================================
--- original.js
+++ change.js
@@ -258,10 +258,10 @@
fill: "#ffffff",
anchorX: 0.5,
anchorY: 0.5
});
- finalBalanceText.x = game.width / 2;
- finalBalanceText.y = game.height / 2 + 200; // Position below the popup
+ finalBalanceText.x = game.width / 2 - 200;
+ finalBalanceText.y = game.height / 2 - 200; // Position below the popup
// Add the final balance text to the game
game.addChild(finalBalanceText);
LK.setTimeout(function () {
LK.showGameOver();
A Technical dark background. Nothing just a gradiant of colors from black to dark blue. Theme : stock market. background
A modern clean empty rectangular button without borders. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
without shadow
a basic empty ui popup with a black background. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.