Code edit (21 edits merged)
Please save this source code
User prompt
Please fix the bug: 'instructions is not defined' in or related to this line: 'game.addChild(instructions);' Line Number: 761
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: particleGraphics.setScale is not a function' in or related to this line: 'particleGraphics.setScale(sc, sc);' Line Number: 314
Code edit (1 edits merged)
Please save this source code
Code edit (13 edits merged)
Please save this source code
User prompt
please make the particles move upwards in a wavy pattern instead of straight like now. Use individual amplitude for particles so they don't all move exactly the same.
User prompt
Please fix the bug: 'ReferenceError: particleGraphicsGraphics is not defined' in or related to this line: 'self.addChild(particleGraphicsGraphics);' Line Number: 313
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'length')' in or related to this line: 'if (self.particles.length < self.particlesMax) {' Line Number: 329
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: 'tileTypes is not defined' in or related to this line: 'var boxGraphics = self.attachAsset(tileTypes[colorIndex], {' Line Number: 124
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'star is not defined' in or related to this line: 'stars.push(star);' Line Number: 260
Code edit (22 edits merged)
Please save this source code
User prompt
Please make the levelcomplete screen contain and display a fireworks explosion when it opens
Code edit (1 edits merged)
Please save this source code
User prompt
please place an instance of the gamelogo center screen top
Code edit (3 edits merged)
Please save this source code
User prompt
please loop the testmusic instead of the background music
User prompt
make a background music asset to be looped continously
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'map')' in or related to this line: 'currentLevel = levels[currentLevelID].map(function (arr) {' Line Number: 960
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'map')' in or related to this line: 'currentLevel = levels[currentLevelID].map(function (arr) {' Line Number: 960
===================================================================
--- original.js
+++ change.js
@@ -91,12 +91,17 @@
});
var ColorBox = Container.expand(function (colorIndex) {
var self = Container.call(this);
self.colorIndex = colorIndex;
- var boxGraphics = self.attachAsset('box', {
+ /*var boxGraphics = self.attachAsset('box', {
anchorX: 0.5,
anchorY: 0.5,
tint: colors[colorIndex]
+ });*/
+ var boxGraphics = self.attachAsset(tileTypes[colorIndex], {
+ anchorX: 0.5,
+ anchorY: 0.5
+ //tint: colors[colorIndex]
});
self.gridX = 0;
self.gridY = 0;
self.speed = 10;
@@ -222,8 +227,34 @@
}
});
};
});
+var Firework = Container.expand(function () {
+ var self = Container.call(this);
+ var starGraphics = self.attachAsset('star', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ tint: Math.random() * 0xffffff
+ });
+ self.addChild(starGraphics);
+ self.x = 0;
+ self.y = 0;
+ self.dx = 15 - Math.random() * 30;
+ self.dy = 2 + Math.random() * 40;
+ self.drot = 0.11 - Math.random() * 0.22;
+ self.isDead = false;
+ self.counter = 0;
+ self._move_migrated = function () {
+ self.rotation += self.drot;
+ self.x += self.dx;
+ self.y -= self.dy;
+ self.dy -= 1;
+ if (++self.counter > 500) {
+ self.destroy();
+ self.isDead = true;
+ }
+ };
+});
var LevelComplete = Container.expand(function () {
var self = Container.call(this);
var arrowGraphics = self.attachAsset('levelCompleteBg', {
anchorX: 0.5,
@@ -239,10 +270,10 @@
label.x = 0;
label.y = -100;
self.addChild(label);
// Add fireworks explosion effect
- for (var i = 0; i < 20; i++) {
- var firework = new Star(0, 0, Math.random() * 2048, Math.random() * 2732, i * 10, 0xFFFFFF);
+ for (var i = 0; i < 40; i++) {
+ var firework = new Firework();
self.addChild(firework);
stars.push(firework);
}
});
@@ -512,8 +543,10 @@
board.y = boardCenterY; //2732 / 2 + 200;
game.addChild(board);
// 0 black 1 white 2 yellow 3 red 4 blue 5 green 6 purple 7 grey 8 brown 9 skin
var colors = ['0x000000', '0xffffff', '0xffff00', '0xff0000', '0x0000dd', '0x00ff00', '0xff00ff', '0xbbbbbb', '0x827364', '0xecbcb4'];
+var tileSprites = ['box', 'tileWhite', 'tileYellow', 'tileRed', 'tileBlue', 'tileGreen', 'tilePurple', 'tileGray', 'tileBrown', 'tileBeige'];
+var tileTypes = tileSprites; // Define tileTypes to fix the error
// 5x5 levels.
var l1a = [[0, 0, 0, 0, 0], [0, 0, 1, 0, 0], [0, 1, 2, 1, 0], [0, 0, 1, 0, 0], [0, 0, 0, 0, 0]];
var l1b = [[0, 0, 0, 0, 0], [0, 0, 4, 0, 0], [0, 5, 4, 5, 0], [0, 5, 0, 5, 0], [0, 0, 0, 0, 0]];
var l1c = [[0, 0, 0, 0, 0], [0, 3, 0, 3, 0], [0, 0, 2, 0, 0], [0, 3, 0, 3, 0], [0, 0, 0, 0, 0]];
@@ -900,9 +933,9 @@
var highScore = storage.highScore || 0;
if (playerScore > highScore) {
storage.highScore = playerScore;
}
- console.log('highscore is now:', storage.highScore);
+ //console.log('highscore is now:', storage.highScore);
t.tint = 0xFF0000;
isGameOver = true;
t.blinkRed();
/*
@@ -922,9 +955,9 @@
duration: 150,
easing: tween.easeInOut
});
}
- });*/
+ });*/
LK.setScore(playerScore);
//LK.showGameOver();
} else if (newPos != 999) {
t.moveInPosition();
A large calm background drawing for a puzzle game, in dark calm blueish colors and non-confusing content. High definition. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A quadratic polished dark blue marble slate. Front perspective with right angles. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A white question mark in a circle, like for a help button in a game.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A white X in a circle, like for a close window button in a game. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A white questionmark on a black background. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A green check mark on a dark background. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.