Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (20 edits merged)
Please save this source code
User prompt
Implement self.calculateWarningScoreList = function () {}; which should return 13 warning values based on how many bubbles are getting close to the bottom of the screen. The goal being to show a warning to the user that some balls are getting close to the bottom.
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
Please fix the bug: 'TypeError: null is not an object (evaluating 'bubbleIndex.col')' in or related to this line: 'var newCol = bubbleIndex.col + dir[1];' Line Number: 221
User prompt
Please fix the bug: 'TypeError: null is not an object (evaluating 'bubbleIndex.row')' in or related to this line: 'var newRow = bubbleIndex.row + dir[0];' Line Number: 218
Code edit (2 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: null is not an object (evaluating 'bubbleIndex.row')' in or related to this line: 'if (rows[bubbleIndex.row] && rows[bubbleIndex.row].length == 12) {' Line Number: 211
Code edit (1 edits merged)
Please save this source code
Code edit (4 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: null is not an object (evaluating 'bubbleIndex.row')' in or related to this line: 'if (rows[bubbleIndex.row].length == 12) {' Line Number: 211
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: 'TypeError: null is not an object (evaluating 'bubbleIndex.row')' in or related to this line: 'if (rows[bubbleIndex.row].length == 12) {' Line Number: 211
Code edit (10 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: Can't find variable: intersectedBubble' in or related to this line: 'var intersectedBubblePos = self.findBubbleIndex(intersectedBubble);' Line Number: 313
Code edit (1 edits merged)
Please save this source code
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
===================================================================
--- original.js
+++ change.js
@@ -407,16 +407,16 @@
bubble.destroy();
}
}
if (gameIsStarted) {
- self.y += .5;
+ self.y += gridSpeed;
}
var zeroRow = rows[rows.length - 1];
if (zeroRow) {
for (var a = 0; a < zeroRow.length; a++) {
var bubble = zeroRow[a];
if (bubble) {
- if (bubble.y + self.y > -100) {
+ if (bubble.y + self.y > 0) {
insertRow();
}
break;
}
@@ -428,12 +428,19 @@
if (lastRow) {
for (var a = 0; a < zeroRow.length; a++) {
var bubble = lastRow[a];
if (bubble) {
- if (bubble.y + self.y > 2200) {
+ if (bubble.y + self.y > 2800) {
LK.effects.flashScreen(0xffffff, 3000);
LK.showGameOver();
}
+ if (gameIsStarted) {
+ if (bubble.y + self.y < 1000) {
+ gridSpeed = Math.min(gridSpeed + .01, 1);
+ } else {
+ gridSpeed = Math.max(gridSpeed - .01, .5);
+ }
+ }
break;
}
}
}
@@ -467,8 +474,11 @@
previewBubble.scale.set(1, 1);
createPreviewBubble();
};
self.angle = -Math.PI / 2;
+ self.getTint = function () {
+ return bubble.tint;
+ };
});
var ScoreIndicatorLabel = Container.expand(function (score, type) {
var self = Container.call(this);
var label = new Text2(score, {
@@ -517,8 +527,9 @@
/****
* Game Code
****/
// Function to increase game score and update score label
+var gridSpeed = .5;
function increaseScore(amount) {
var currentScore = LK.getScore();
var newScore = currentScore + amount;
LK.setScore(newScore); // Update the game score using LK method
@@ -534,9 +545,9 @@
[ ]
*/
var bubbleSize = 150;
var gameIsStarted = false;
-var bubbleColors = [0xff3c63, 0x8ed731, 0x4eacff, 0x7436ff, 0xffb230, 0xfffb3c];
+var bubbleColors = [0xff3c63, 0x8ed731, 0x4eacff, 0xb636ff, 0xff8d30, 0xfffb3c];
var barriers = [];
var maxTypes = 5;
for (var a = 0; a < 4; a++) {
for (var b = 0; b < 3; b++) {
@@ -566,9 +577,9 @@
game.addChild(sm);
}
var particlesLayer = game.addChild(new Container());
var grid = game.addChild(new Grid());
-grid.y = 800;
+grid.y = 1000;
var freeBubbleLayer = game.addChild(new Container());
var hintBubblePlayer = game.addChild(new Container());
var launcher = game.addChild(new Launcher());
launcher.x = game.width / 2;
@@ -586,9 +597,9 @@
refreshHintLine();
// }
};
function getMaxTypes() {
- return Math.max(Math.min(Math.floor(LK.getScore() / 10000), bubbleColors.length), 3);
+ return Math.max(Math.min(Math.floor(LK.getScore() / 50000), bubbleColors.length), 3);
}
function refreshHintLine() {
var ox = hintTargetX - launcher.x;
var oy = hintTargetY - launcher.y;
@@ -608,8 +619,9 @@
hintOffset = hintOffset % distanceBetweenHintbubbles;
var distanceSinceLastDot = -hintOffset + 100;
var hintBubbleOffset = 0;
var lastPoint = path[0];
+ var tint = launcher.getTint();
for (var a = 1; a < path.length; a++) {
var p2 = path[a];
var ox = p2.x - lastPoint.x;
var oy = p2.y - lastPoint.y;
@@ -624,8 +636,9 @@
hintBubblePlayer.addChild(currentBubble);
}
currentBubble.alpha = bubbleAlpha;
currentBubble.visible = true;
+ currentBubble.tint = 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.