Code edit (4 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: letter is not defined' in or related to this line: 'removeLastLetterOnBlackBoard(letter);' Line Number: 106
Code edit (1 edits merged)
Please save this source code
Code edit (4 edits merged)
Please save this source code
User prompt
when player clicks on streaktext, show a litttle window with this message: "Your streak increases with each successive correct guess, but is reset to 0 on a wrong guess. Extend your streak for better score multipliers." The window should also have a close button.
Code edit (8 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Timeout.tick error: star is not defined' in or related to this line: 'star.alpha -= 1 / lifetime;' Line Number: 590
Code edit (5 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: streakText is not defined' in or related to this line: 'streakText.setText("Streak: " + streak + streakBonus);' Line Number: 270
Code edit (1 edits merged)
Please save this source code
Code edit (22 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: letter is not defined' in or related to this line: 'var blackboardText = new Text2(letter, {' Line Number: 61
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
in function resetgamefornextlevel, make a few seconds long pause before displaylettersniline is called, and show a message to the player: next level
Code edit (1 edits merged)
Please save this source code
Code edit (2 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: Lk is not defined' in or related to this line: 'Lk.getSound('correctWord').play();' Line Number: 114
Code edit (5 edits merged)
Please save this source code
User prompt
play the tap sound when a lettertile is tapped
Code edit (8 edits merged)
Please save this source code
User prompt
play the background music when the game starts, and let it repeat until gameover
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: submitButon is not defined' in or related to this line: 'submitButon.destroy();' Line Number: 293
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -225,8 +225,12 @@
weight: 800
});
streakText.anchor.set(0, 0);
LK.gui.topLeft.addChild(streakText);
+// Add event listener to streakText
+streakText.down = function (x, y, obj) {
+ showStreakInfoWindow();
+};
var streakMult = 1;
var blackBoardArr = [];
var wholeBlackBoardArr = [];
var currentWord = "";
@@ -548,9 +552,9 @@
// Game update logic
};
function createScoreNotice(x, y, value) {
var label = new Text2('+' + value, {
- size: 60,
+ size: 120,
fill: "#ADE6D8",
stroke: "#000000",
strokeThickness: 10,
weight: 800
@@ -564,9 +568,9 @@
var lifetime = 30;
var tick = 0;
var interval = LK.setInterval(function () {
label.y += vy;
- label.alpha -= 1 / lifetime;
+ label.alpha -= 0.25 / lifetime;
tick++;
if (tick >= lifetime) {
label.destroy();
LK.clearInterval(interval);
@@ -603,5 +607,51 @@
}
}, 16);
})(star, vx, vy);
}
+}
+function showStreakInfoWindow() {
+ // Create a container for the window
+ var streakInfoWindow = new Container();
+ // Create a background for the window
+ var windowBg = LK.getAsset('nextLevelBg', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ x: 2048 / 2,
+ y: 2732 / 2,
+ scaleX: 0.8,
+ scaleY: 0.4
+ });
+ streakInfoWindow.addChild(windowBg);
+ // Create the text for the window
+ var infoText = new Text2("Your streak increases with each successive correct guess, but is reset to 0 on a wrong guess. Extend your streak for better score multipliers.", {
+ size: 60,
+ fill: "#ffffff",
+ stroke: "#000000",
+ strokeThickness: 10,
+ align: 'center',
+ wordWrap: true,
+ wordWrapWidth: 1500
+ });
+ infoText.anchor.set(0.5, 0.5);
+ infoText.x = 2048 / 2;
+ infoText.y = 2732 / 2 - 50;
+ streakInfoWindow.addChild(infoText);
+ // Create the close button
+ var closeButton = new Text2("Close", {
+ size: 80,
+ fill: "#ff0000",
+ stroke: "#000000",
+ strokeThickness: 10,
+ align: 'center'
+ });
+ closeButton.anchor.set(0.5, 0.5);
+ closeButton.x = 2048 / 2;
+ closeButton.y = 2732 / 2 + 150;
+ streakInfoWindow.addChild(closeButton);
+ // Add event listener to close button
+ closeButton.down = function (x, y, obj) {
+ streakInfoWindow.destroy();
+ };
+ // Add the window to the game
+ game.addChild(streakInfoWindow);
}
\ No newline at end of file
A smooth, clean, blank and empty scrabble tile for a game.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A clean, warm and welcoming classroom in a school, facing the blackboard.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A small golden star. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.