Code edit (1 edits merged)
Please save this source code
Code edit (2 edits merged)
Please save this source code
User prompt
popupBucket, while fading out, make the bucketAsset rotate
Code edit (4 edits merged)
Please save this source code
User prompt
call popupBucket on score
Code edit (1 edits merged)
Please save this source code
User prompt
in popupMultiplier, add an offset to the asset position so that it doesn't go out of screen
Code edit (5 edits merged)
Please save this source code
User prompt
in popupMultiplier, when grow anim ends fade the asset and destroy it
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
in popupMultiplier, don't use scale, use width and height
Code edit (1 edits merged)
Please save this source code
User prompt
call popupMultiplier(value, x, y) at each bounce
Code edit (2 edits merged)
Please save this source code
User prompt
in popupMultiplier, popup the x2 asset at the position x,y. start at with,heigth 1x1 and make it grow until 1024x1024
User prompt
in popupMultiplier, check if value is in possibleValues, if not set it to 999;
Code edit (5 edits merged)
Please save this source code
User prompt
flash the ball at each bounce
User prompt
flash the screen at each bounce
Code edit (7 edits merged)
Please save this source code
User prompt
move the hoop after a shoot even if not scored
Code edit (1 edits merged)
Please save this source code
Code edit (9 edits merged)
Please save this source code
User prompt
don't accept other touch while ball is moving
===================================================================
--- original.js
+++ change.js
@@ -42,32 +42,36 @@
// Top boundary
if (self.y <= 0 + self.half) {
self.y = 0 + self.half;
self.speedY *= -1 * self.wallBounceSpeedRatio;
- LK.effects.flashScreen(0xffffff, 300); // Flash screen white for 300ms
bounceCounter = (bounceCounter || 1) * (bounceCounter + 1); // Increment bounce counter
+ // Flash the ball at bounce
+ LK.effects.flashObject(self, 0xffffff, 500);
// TODO : update bounce counter (x,y)
}
// Bottom boundary
if (ball.y > game.height - self.half) {
ball.y = game.height - self.half;
ball.speedY *= -1 * self.wallBounceSpeedRatio * self.floorBounceRatio;
- LK.effects.flashScreen(0xffffff, 300); // Flash screen white for 300ms
bounceCounter = (bounceCounter || 1) * (bounceCounter + 1); // Increment bounce counter
+ // Flash the ball at bounce
+ LK.effects.flashObject(self, 0xffffff, 500);
}
// Left boundary
if (ball.x < 0 + self.half) {
ball.x = 0 + self.half;
ball.speedX *= -1 * self.wallBounceSpeedRatio;
- LK.effects.flashScreen(0xffffff, 300); // Flash screen white for 300ms
bounceCounter = (bounceCounter || 1) * (bounceCounter + 1); // Increment bounce counter
+ // Flash the ball at bounce
+ LK.effects.flashObject(self, 0xffffff, 500);
}
// Right boundary
if (ball.x > game.width - self.half) {
ball.x = game.width - self.half;
ball.speedX *= -1 * self.wallBounceSpeedRatio;
- LK.effects.flashScreen(0xffffff, 300); // Flash screen white for 300ms
bounceCounter = (bounceCounter || 1) * (bounceCounter + 1); // Increment bounce counter
+ // Flash the ball at bounce
+ LK.effects.flashObject(self, 0xffffff, 500);
}
// Reset ball when in bottom and its speed is very low
if (ball.y > game.height * 0.6 && Math.abs(self.speedX) < 5 && Math.abs(self.speedY) < 5) {
self.reset();