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
Code edit (1 edits merged)
Please save this source code
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: 'ReferenceError: particleGraphics is not defined' in or related to this line: 'if (particleGraphics.alpha <= 0) {' Line Number: 247
Code edit (1 edits merged)
Please save this source code
Code edit (5 edits merged)
Please save this source code
User prompt
please implement it that way
Code edit (5 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: movetype is not defined' in or related to this line: 'if (movetype == 0) {' Line Number: 119
===================================================================
--- original.js
+++ change.js
@@ -20,8 +20,10 @@
self.x += self.vx;
self.y += self.vy;
// Gradually fade out the particle
particleGraphics.alpha -= 0.004;
+ //self.scale.x -= 0.1;
+ //self.scale.y -= 0.1;
};
});
/*
TODOS:
@@ -35,10 +37,11 @@
- Maybe show the name of each palette used?
- Maybe show game title on top, above score?
- Brainstorm for game title: color space, colorful space, colorful universe, luniverse, loonyverse, star catcher,
planet catcher, sort the universe, planet sorting, Lala Universe, universal palettes, Colorvoid, Color Void,
-Beauty-verse, Space Splatter, Basket Case Balls, Everything is Round, What Goes Around, Unruly Universe. Pesky Galaxies
-- Particle effect when a star is clicked?
+Beauty-verse, Space Splatter, Basket Case Balls, Everything is Round, What Goes Around, Unruly Universe, Pesky Galaxies,
+Noli Turbare, Multiverse Explorer, Basket No Ball
+- Green palette, perhaps other ones as well, is too hard to distinguish on mobile.
*/
var Selector = Container.expand(function () {
var self = Container.call(this);
var selectorGraphics = self.attachAsset('selector', {
@@ -232,18 +235,8 @@
particle.init(x, y, vx, vy, scale);
game.addChild(particle);
particles.push(particle);
}
- // Update and remove particles
- LK.on('tick', function () {
- particles.forEach(function (particle, index) {
- particle.move();
- if (particleGraphics.alpha <= 0) {
- particle.destroy();
- particles.splice(index, 1);
- }
- });
- });
}
function hsvToHex(h, s, v) {
var r, g, b, i, f, p, q, t;
i = Math.floor(h * 6);
@@ -287,19 +280,22 @@
return colors;
}();
var customColorsVibin = ["0xeffbf9", "0x0b152e", "0x194471", "0x1b7eb4", "0x11bbd9", "0x0f5434", "0x127d2c", "0x1a9f25", "0x60d12b", "0x162a2e", "0x2d4747", "0x3b6058", "0x577d6f", "0x13353b", "0x205858", "0x2d7d75", "0x57ab96", "0x67978c", "0x83b09c", "0xa9d5bb", "0xdbf2df", "0xbc5132", "0xd97840", "0xe29e3f", "0xfbca6b", "0xb03502", "0xcd6d07", "0xea9b06", "0xf2cc2c", "0x60212b", "0x8a331d", "0xb46d23", "0xd9a744", "0x64112a", "0x961b2d", "0xc02038", "0xf23a3a", "0x301d32", "0x6f1771", "0xbc1a8d", "0xf23e9a", "0x433933", "0x585047", "0x7d705c", "0x9b9172", "0x003a5c", "0x03668e", "0x0d8cb0", "0x18abc4", "0xd138a0", "0xea5699", "0xf78c9d", "0xfbb495", "0xa76372", "0xc98a9c", "0xe6acc1", "0xf2bed1", "0x16111d"];
var galacticGreen = ["0xe8f1a6", "0xcad670", "0xa3c255", "0x6fa341", "0x498f45", "0x387450", "0x2d5c56", "0x1f3741", "0x1e2029", "0x16161c"];
-var berryNebula = ["0x6ceded", "0x6cb9c9", "0x6d85a5", "0x6e5181", "0x6f1d5c", "0x4f1446", "0x2e0a30", "0x0d001a"];
+//var berryNebula = ["0x6ceded", "0x6cb9c9", "0x6d85a5", "0x6e5181", "0x6f1d5c", "0x4f1446", "0x2e0a30", "0x0d001a"];
+var berryNebula = ["0x6ceded", "0x6d85a5", "0x6e5181", "0x6f1d5c", "0x4f1446", "0x0d001a"];
var matriax8c = ["0xf0f0dc", "0x736464", "0xa0694b", "0xd24040", "0x00a0c8", "0x10c840", "0xfac800", "0x101820"];
var vividMemory8 = ["0xe21c61", "0xe26159", "0xfea85f", "0xd8dcb4", "0x5eb6ad", "0x1b958d", "0x105390", "0x381631"];
-var superNova7 = ["0xffce9c", "0xcf7862", "0xa75252", "0x773a4d", "0x543246", "0x3d203b", "0x1a080e"];
+//var superNova7 = ["0xffce9c", "0xcf7862", "0xa75252", "0x773a4d", "0x543246", "0x3d203b", "0x1a080e"];
+var superNova7 = ["0xffce9c", "0xcf7862", "0xa75252", "0x773a4d", "0x543246", "0x1a080e"];
var cyclope6 = ["0x30e1b9", "0x0eaf9b", "0x0b8a8f", "0x32535f", "0x631b34", "0x411d31"];
var hotSand = ["0xf26d1f", "0xe04217", "0xc02b18", "0x7c0300", "0x590000", "0x3a0000"];
-var pinkNeonSign6 = ["0xef87c3", "0xcc77af", "0x9e6695", "0x70567b", "0x51496b", "0x313d59"];
+//var pinkNeonSign6 = ["0xef87c3", "0xcc77af", "0x9e6695", "0x70567b", "0x51496b", "0x313d59"];
+var pinkNeonSign6 = ["0xffe8e3", "0xef97c3", "0xcc77af", "0x9e6695", "0x70567b", "0x313d59"];
//var currentPalette = berryNebula;
//game.setBackgroundColor(currentPalette[currentPalette.length - 1]);
// Since game changes between palettes as we progress, we keep the different palettes in an array and have a counter for which one we're current using.
-var allPalettesCounter = 0;
+var allPalettesCounter = 4;
var allPalettes = [vividMemory8, berryNebula, superNova7, matriax8c, pinkNeonSign6, hotSand, cyclope6, galacticGreen];
var currentPalette = allPalettes[allPalettesCounter];
game.setBackgroundColor(currentPalette[currentPalette.length - 1]);
// TODO: Add more palettes to game.
@@ -383,15 +379,15 @@
LK.gui.top.addChild(scoreTxt);
// Drag character
// Game tick
LK.on('tick', function () {
- console.log(particles.length);
+ //console.log(particles.length);
stars.forEach(function (star, index) {
star.move();
});
particles.forEach(function (particle, index) {
particle.move();
- if (particle.alpha <= 0) {
+ if (particle.alpha <= 0 || particle.y > game.height - 200) {
particles.splice(index, 1);
particle.destroy();
}
});
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.