Code edit (1 edits merged)
Please save this source code
Code edit (11 edits merged)
Please save this source code
User prompt
Please fix the bug: 'storage is not defined' in or related to this line: 'storage.bestScore = storage.bestScore || 0;' Line Number: 305 ↪💡 Consider importing and using the following plugins: @upit/storage.v1
Code edit (8 edits merged)
Please save this source code
User prompt
Migrate to the latest version of LK
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -230,9 +230,9 @@
var powerupText;
var showPowerupText = function showPowerupText() {
powerupText = new Text2('Powerup Activated!\nAll visible obstacles cleared!\nTap to continue', {
size: 100,
- fill: "#bbbbbb",
+ fill: 0xBBBBBB,
align: 'center'
});
powerupText.y = 2700 / 2;
powerupText.x = 2048 / 2;
@@ -281,11 +281,16 @@
var powerup1Activated = false;
// Initialize player
var scoreTxt = new Text2('0', {
size: 150,
- fill: "#ffffff"
+ fill: 0xFFFFFF
});
LK.gui.top.addChild(scoreTxt);
+var bestScoreTxt = new Text2('Best:\n', {
+ size: 100,
+ fill: 0xFFFFFF
+});
+LK.gui.bottom.addChild(bestScoreTxt);
// Initialize orbits
function createOrbits() {
for (var i = 0; i < 5; i++) {
var orbit = game.addChild(new Orbit());
@@ -296,9 +301,9 @@
createOrbits();
// Add instruction text at the bottom of the screen
var instructionText = new Text2('Tap to jump to the next orbit.\nDon\'t hit the red obstacles.', {
size: 50,
- fill: "#bbbbbb",
+ fill: 0xBBBBBB,
align: 'center'
});
instructionText.y = 163;
instructionText.x = 50;