User prompt
rename game to Idle BrickBreaker
User prompt
game should start with 0 points unless player has points in local storage βͺπ‘ Consider importing and using the following plugins: @upit/storage.v1
User prompt
Level 1 bricks should only give 1 point whendestoryed
User prompt
save in storage also the ball that the player has bought. βͺπ‘ Consider importing and using the following plugins: @upit/storage.v1
User prompt
save upgrades purchased in local storage βͺπ‘ Consider importing and using the following plugins: @upit/storage.v1
User prompt
on game start I always see 0 points until I click on a brick. It should already have loaded the points in local storage βͺπ‘ Consider importing and using the following plugins: @upit/storage.v1
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'setText')' in or related to this line: 'scoreTxt.setText('$' + score.toString());' Line Number: 379
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'hud.addChild(scoreTxt);' Line Number: 385
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'hud.addChild(scoreTxt);' Line Number: 385
Code edit (1 edits merged)
Please save this source code
User prompt
Why is ball not spawning after bought?
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'return {' Line Number: 342
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'update')' in or related to this line: 'ball.update();' Line Number: 978
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'update')' in or related to this line: 'ball.update();' Line Number: 981
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'return {' Line Number: 342
User prompt
can you sanve upgrades bought in local storage βͺπ‘ Consider importing and using the following plugins: @upit/storage.v1
User prompt
clic upgrade is not being saves βͺπ‘ Consider importing and using the following plugins: @upit/storage.v1
User prompt
make sure the upgrades objects are being initialized from stogare data βͺπ‘ Consider importing and using the following plugins: @upit/storage.v1
User prompt
make sure balls are being initialized from storage data βͺπ‘ Consider importing and using the following plugins: @upit/storage.v1
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'balls.push(ball);' Line Number: 813
User prompt
make sure balls are stored in local storage βͺπ‘ Consider importing and using the following plugins: @upit/storage.v1
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'balls.push(ball);' Line Number: 813
User prompt
make sure reset button also reset upgrades storage data βͺπ‘ Consider importing and using the following plugins: @upit/storage.v1
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -355,17 +355,9 @@
splashBallCost: 100,
sniperBallCost: 150,
scatterBallCost: 125
};
-var balls = storage.balls ? storage.balls.map(function (ballData) {
- var ball = new Ball(ballData.type);
- ball.x = ballData.x;
- ball.y = ballData.y;
- ball.direction = ballData.direction;
- ball.speed = ballData.speed;
- ball.power = ballData.power;
- return ball;
-}) : [];
+var balls = [];
var bricks = [];
var brickGrid = {};
var score = storage.score || 0;
var level = storage.level || 1;
@@ -384,8 +376,32 @@
splash: false,
sniper: false,
scatter: false
};
+ storage.upgrades = {
+ // Reset upgrades storage data
+ normalSpeed: 1,
+ normalPower: 1,
+ splashSpeed: 1,
+ splashPower: 1,
+ sniperSpeed: 1.5,
+ sniperPower: 2,
+ scatterSpeed: 1,
+ scatterPower: 1,
+ clickDamage: 1,
+ normalSpeedCost: 50,
+ normalPowerCost: 75,
+ splashSpeedCost: 50,
+ splashPowerCost: 75,
+ sniperSpeedCost: 75,
+ sniperPowerCost: 100,
+ scatterSpeedCost: 50,
+ scatterPowerCost: 75,
+ clickCost: 25,
+ splashBallCost: 100,
+ sniperBallCost: 150,
+ scatterBallCost: 125
+ };
score = 0;
level = 1;
unlockedTiers = Object.assign({}, storage.unlockedTiers);
scoreTxt.setText('$' + score.toString());