Code edit (11 edits merged)
Please save this source code
User prompt
also make the dragged item highest depth
User prompt
fix my code so that the draggable functionality works
Code edit (9 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Cannot set properties of undefined (setting 'tint')' in or related to this line: 't.starGraphics.tint = collection[i].c;' Line Number: 469
Code edit (1 edits merged)
Please save this source code
Code edit (6 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot set properties of undefined (setting 'alpha')' in or related to this line: 'score.text.alpha = 0;' Line Number: 468
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
please write that function as a standalone function to be called from within the star's current move function
Code edit (1 edits merged)
Please save this source code
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: center is not defined' in or related to this line: 'var instructionsTxt = new Text2('Welcome to space, traveler!\nTap to collect the color indicated below.', {' Line Number: 426
Code edit (1 edits merged)
Please save this source code
Code edit (12 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Error: The supplied index is out of bounds' in or related to this line: 'game.setChildIndex(counter, game.children.length);' Line Number: 249
Code edit (9 edits merged)
Please save this source code
User prompt
can you update this line, so it updates the textlabel with the new value
Code edit (1 edits merged)
Please save this source code
Code edit (18 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: sel is not defined' in or related to this line: 'self.x = sel.x;' Line Number: 24
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -187,9 +187,9 @@
//var moveType = (movementTypeSelectorOffset + allPalettesCounter) % 5;
/*if (currentPalette == matriax8c && score != 0) {
moveType == 3;
}*/
- if (moveType == 0) {
+ if (moveType == 4) {
self.x = centerX + self.vx * self.z;
self.y = centerY + self.vy * self.z;
} else if (moveType == 1) {
self.x = centerX + self.vx * self.z;
@@ -199,9 +199,9 @@
self.y = centerY + self.vy * self.z;
} else if (moveType == 3) {
self.x = centerX + Math.sin(self.z / 10000) * self.vx * self.z;
self.y = centerY + Math.cos(self.z / 10000) * self.vy * self.z;
- } else if (moveType == 4) {
+ } else if (moveType == 0) {
// Calculate the direction vector from the center to the star
var dx = self.x - centerX;
var dy = self.y - centerY;
// Normalize the direction vector
@@ -215,8 +215,9 @@
self.vy -= dx * 0.4 * 7500 / self.z; // Adjust the 0.05 value to control the tightness of the spiral
// Update position based on velocity
self.x += self.vx;
self.y += self.vy;
+ self.z += self.speed / 2; // A little extra z required for this effect, for faster scaling.
} else {
self.x = centerX + self.vx * self.z;
//self.x += Math.cos(LK.ticks % 100) * 10;
self.y -= 4;
@@ -264,8 +265,10 @@
}
} else {
// Move selector to next color on palette.
selector.init(currentRightColor);
+ //LK.effects.flashObject(selector, 0xFFFF00, 1000);
+ LK.effects.flashObject(selector, currentPalette[currentRightColor], 2000);
}
counter.init();
game.setChildIndex(counter, game.children.length - 1);
//game.getChildByName('counter').setDepth(game.getChildByName('selector').getDepth() + 1);
@@ -400,8 +403,10 @@
game.on('down', function (obj) {
if (!gameStarted) {
gameStarted = true;
instructionsTxt.destroy();
+ gameLogo.destroy();
+ scoreTxt.alpha = 1;
} else {
var pos = obj.event.getLocalPosition(game);
//targetX = pos.x;
//targetY = pos.y;
@@ -460,12 +465,12 @@
scoreTxt.alpha = 0;
LK.gui.top.addChild(scoreTxt);
var gameLogo = game.addChild(new GameLogo());
gameLogo.x = game.width / 2;
-gameLogo.y = 750;
-var instructionsTxt = new Text2('Welcome to space, traveler!\nTap to collect the color indicated below.', {
+gameLogo.y = 700;
+var instructionsTxt = new Text2("Welcome to colorful space!\n\nWe'll be collecting colors from all\nof the galaxies.\n\nTap a planet of the color indicated below\nto get started.", {
weight: 800,
- size: 100,
+ size: 90,
fill: "#ffffff",
anchorX: 0.5,
align: 'center',
dropShadow: true,
A white triangle pointing down.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A colorful rectangular button with the text "Play Again" with each letter in a different color picked from a nice palette.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.