User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'setText')' in or related to this line: 'scoreTxt.setText(score.toString()); // Update score display' Line Number: 932
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'setText')' in or related to this line: 'scoreTxt.setText(score.toString()); // Update score display' Line Number: 932
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'y')' in or related to this line: 'goalBackground.y = goalTxt.y;' Line Number: 1919
User prompt
check the code for errors, bugs and fix them
User prompt
find the text: "happy new year" in the code and change it to "Trick or Treat"
User prompt
find the text in the code: "Year of the Dragon" and change it to "Spooky Match"
User prompt
Please fix the bug: 'Timeout.tick error: Cannot read properties of undefined (reading 'dx')' in or related to this line: 'hintOverlay.x = move.gemStartPosition.x + moveDirection.dx * moveDistance * waveProgress;' Line Number: 167
User prompt
Migrate to the latest version of LK
Remix started
Copy Dragon Match: New Years
===================================================================
--- original.js
+++ change.js
@@ -1544,8 +1544,10 @@
/****
* Game Code
****/
+game.width = 2048;
+game.height = 2732;
// Initialize a timer for showing hints
// Initialize 2-minute timer
// Initialize score
// Initialize large countdown at the beginning of the game
@@ -1841,8 +1843,11 @@
}
}]);
return SagaMap;
}(Container);
+var board = new Board();
+game.addChild(board);
+board.initBoard();
var dragonSpawnTimer;
var isDragoning = false;
function triggerDragon() {
if (dragonSpawnTimer) {
@@ -1864,8 +1869,37 @@
dragonSpawnTimer = LK.setTimeout(triggerDragon, nextSpawnTime);
}
triggerDragon();
var goalGemType;
+var goalBackground = LK.getAsset('goalBackgroundSprite', {
+ x: 2048 - 100,
+ y: 50,
+ anchorX: .5,
+ anchorY: .5
+});
+goalBackground.y = goalTxt.y;
+goalBackground.x = goalTxt.x - 100;
+goalBackground.anchor.set(0.5, 0.5);
+goalBackground.alpha = .6;
+var goalTxt = new Text2('', {
+ size: 100,
+ weight: 500,
+ fill: "#ffffff",
+ x: 0,
+ y: 50,
+ anchorX: 0,
+ anchorY: 0,
+ dropShadow: true,
+ dropShadowColor: '#000000',
+ shadowBlur: 4,
+ shadowOffsetX: 2,
+ shadowOffsetY: 2,
+ strokeThickness: 7
+});
+board.addChild(goalTxt);
+goalTxt.anchor.set(0, .5);
+goalTxt.y = 100;
+goalTxt.x = 450;
var matchedGemCount = 0;
var hintTimer;
var currentGoalGemSprite = false;
var goalLevel = 0;
@@ -2125,8 +2159,28 @@
LK.setTimeout(function () {
// Timer control is now handled inside the modal display logic to pause during the modal display.
}, 3000);
var score = 0; // Starting score
+var scoreTxt = new Text2(score.toString(), {
+ size: 110,
+ weight: 500,
+ fill: "#ffffff",
+ x: 1024,
+ y: 0,
+ anchorX: 0.5,
+ anchorY: 0,
+ dropShadow: true,
+ dropShadowColor: '#000000',
+ shadowBlur: 4,
+ shadowOffsetX: 2,
+ shadowOffsetY: 2,
+ stroke: true,
+ strokeColor: '#000000',
+ strokeThickness: 7
+});
+scoreTxt.anchor.set(.5, .5);
+scoreTxt.y = 50;
+LK.gui.top.addChild(scoreTxt);
var scoreBg;
var scoreBgNode = LK.getAsset('scoreBg', {
x: 1024 - 150,
// Centered based on the background size
glow. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Hourglass icon white. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Glow glare star. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Town of Halloween. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
blue bat. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
green bat. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
purple bat. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
yellow bat. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
spooky ghost. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
spooky halloween forest. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
dark magic particle. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
stylized vampire head. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
stylized halloween pumpkin. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
stylized orange pumpkin. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
stylized purple werwolf head. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
stylized wich head. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
white scull. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
old dark cemetery, 4k, high quality, landscape, digital art. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
abandoned manor, halloween, 4k, high quality, landscape, digital art. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
witch's cauldron. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
horror haloween Checkmark. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.