Code edit (13 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: Can't find variable: isActive' in or related to this line: 'if (isActive) {' Line Number: 57
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 (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
before calling showGameOver flash screen white
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (23 edits merged)
Please save this source code
User prompt
implement //Loop over rows, if a row only has empty values in it, remove it.
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (3 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'game.addChildAt(currentBubble, particleInjectionZIndex);' Line Number: 555
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'currentBubble = hintBubbles[hintBubbleOffset] = new HintBubble();' Line Number: 554
Code edit (10 edits merged)
Please save this source code
User prompt
implement self.printRowsToConsole = function () { //Prints nice representation of the rows grid to console as a string };
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (14 edits merged)
Please save this source code
User prompt
We have the pixel offsets for the bubbles around offsetPositions, however we also want to offset in terms of offset in the rows / columns grid. Can you add that as rx: and ry:
User prompt
Add row / column offsets to offsetPositions
===================================================================
--- original.js
+++ change.js
@@ -17,11 +17,11 @@
var bubbleShine = self.attachAsset('bubbleshine', {
anchorX: 0.5,
anchorY: 0.5
});
- bubbleShine.x = -30;
- bubbleShine.y = -30;
- bubbleShine.alpha = .7;
+ bubbleShine.x = -35;
+ bubbleShine.y = -25;
+ bubbleShine.alpha = .9;
bubbleShine.blendMode = 1;
var state = 0;
var targetX = 0;
var targetY = 0;
@@ -240,9 +240,9 @@
}
var dx = nextX - bubble.x - self.x;
var dy = nextY - bubble.y - self.y;
var distance = Math.sqrt(dx * dx + dy * dy);
- if (distance < (bubbleSize - 50) / 2 + bubbleSize / 2) {
+ if (distance < (bubbleSize - 70) / 2 + bubbleSize / 2) {
return bubble;
}
}
}
@@ -428,9 +428,9 @@
if (lastRow) {
for (var a = 0; a < zeroRow.length; a++) {
var bubble = lastRow[a];
if (bubble) {
- if (bubble.y + self.y > 2800) {
+ if (bubble.y + self.y > 2200) {
LK.effects.flashScreen(0xffffff, 3000);
LK.showGameOver();
}
if (gameIsStarted) {
@@ -454,8 +454,11 @@
var bubble = self.attachAsset('hintbubble', {
anchorX: 0.5,
anchorY: 0.5
});
+ self.setTint = function (tint) {
+ bubble.tint = tint;
+ };
});
var Launcher = Container.expand(function () {
var self = Container.call(this);
var bubble = self.addChild(new Bubble(getMaxTypes()));
@@ -474,10 +477,10 @@
previewBubble.scale.set(1, 1);
createPreviewBubble();
};
self.angle = -Math.PI / 2;
- self.getTint = function () {
- return bubble.tint;
+ self.getType = function () {
+ return bubble.type;
};
});
var ScoreIndicatorLabel = Container.expand(function (score, type) {
var self = Container.call(this);
@@ -545,9 +548,9 @@
[ ]
*/
var bubbleSize = 150;
var gameIsStarted = false;
-var bubbleColors = [0xff3c63, 0x8ed731, 0x4eacff, 0xb636ff, 0xff8d30, 0xfffb3c];
+var bubbleColors = [0xb22bff, 0xff2853, 0x44d31f, 0x29a5fb, 0xff8522, 0xfffa2b];
var barriers = [];
var maxTypes = 5;
for (var a = 0; a < 4; a++) {
for (var b = 0; b < 3; b++) {
@@ -597,9 +600,9 @@
refreshHintLine();
// }
};
function getMaxTypes() {
- return Math.max(Math.min(Math.floor(LK.getScore() / 50000), bubbleColors.length), 3);
+ return Math.max(Math.min(Math.floor((LK.getScore() + 100000) / 50000), bubbleColors.length), 3);
}
function refreshHintLine() {
var ox = hintTargetX - launcher.x;
var oy = hintTargetY - launcher.y;
@@ -619,9 +622,9 @@
hintOffset = hintOffset % distanceBetweenHintbubbles;
var distanceSinceLastDot = -hintOffset + 100;
var hintBubbleOffset = 0;
var lastPoint = path[0];
- var tint = launcher.getTint();
+ var tint = bubbleColors[launcher.getType()];
for (var a = 1; a < path.length; a++) {
var p2 = path[a];
var ox = p2.x - lastPoint.x;
var oy = p2.y - lastPoint.y;
@@ -636,9 +639,9 @@
hintBubblePlayer.addChild(currentBubble);
}
currentBubble.alpha = bubbleAlpha;
currentBubble.visible = true;
- currentBubble.tint = tint;
+ currentBubble.setTint(tint);
currentBubble.x = lastPoint.x - Math.cos(angle) * amountOver;
currentBubble.y = lastPoint.y - Math.sin(angle) * amountOver;
hintBubbleOffset++;
distanceSinceLastDot = 0;
Circular white gradient circle on black background. Gradient from white on the center to black on the outer edge all around.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Soft straight Long red paint on black background. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Fire ball. Bubble shooter game. Thin black outline.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
green notification bubble. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.