Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'console.log("Next type", type);' Line Number: 751
Code edit (23 edits merged)
Please save this source code
Code edit (25 edits merged)
Please save this source code
Code edit (4 edits merged)
Please save this source code
User prompt
Insert sound when bubble detaches. This sound should be called scoreCollected
Code edit (5 edits merged)
Please save this source code
User prompt
Add a new sound when the ball is fired from the launcher
Code edit (2 edits merged)
Please save this source code
User prompt
Before calling LK.gameOver() play a game over jingle
Code edit (4 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -67,16 +67,9 @@
if (newbarpos == 0 && level > 0) {
targetWidth = 5 * bonusBarStepSize;
jumpToAtEnd = 0;
}
- /*bonuseBarEnd.x = -bonusBarWidth + level * bonusBarStepSize;
- bonusBarMiddle.width = level * bonusBarStepSize;*/
};
- // self.setBonusLevel(10);
- //self.setBonusLevel(0);
- /*LK.setInterval(function () {
- self.setBonusLevel(Math.random() * 6 >> 0);
- }, 1000);*/
self.update = function () {
var delta = targetWidth - currentWidth;
if (delta < 1) {
targetWidth = currentWidth = jumpToAtEnd;
@@ -137,9 +130,9 @@
bubbleGraphics.tint = bubbleColors[self.type];
}
self.detach = function () {
freeBubbleLayer.addChild(self);
- LK.getSound('scoreCollected').play();
+ LK.getSound('detachCircle').play();
self.y += grid.y;
self.isAttached = false;
speedX = Math.random() * 40 - 20;
speedY = -Math.random() * 30;
@@ -171,8 +164,9 @@
self.y += speedY;
speedY += 1.5;
if (self.x < bubbleSize / 2 && speedX < 0 || self.x > game.width - bubbleSize / 2 && speedX > 0) {
speedX = -speedX;
+ LK.getSound('circleBounce').play();
}
// Check for collision with barriers
for (var i = 0; i < barriers.length; i++) {
var barrier = barriers[i];
@@ -190,14 +184,16 @@
// Move the bubble back to the point where it just touches the barrier
var overlap = minDist - distance;
self.x += overlap * Math.cos(angle);
self.y += overlap * Math.sin(angle);
+ LK.getSound('circleBounce').play();
}
}
// Remove unattached bubbles that fall below 2732 - 500
if (self.y > 2732 - 400) {
self.destroy();
scoreMultipliers[Math.floor(self.x / (2048 / 5))].applyBubble(self);
+ LK.getSound('scoreCollected').play();
}
}
};
});
@@ -612,8 +608,9 @@
self.removeBubbles(disconnected);
bonusUX.setStreakCount(bonusUX.streakCount + 1);
} else {
bonusUX.setStreakCount(0);
+ LK.getSound('attachCircle').play();
}
//Add a grid movement effect when you don't do a match
var neighbors = self.getNeighbors(bubble);
var touched = [];
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.