User prompt
while dot is in on top of black background there is no game ove
User prompt
if dot is over transparent obstacle then no game over
User prompt
add multiple colission points on the big obstacle to delimit the image boundries.
User prompt
make sure bigobstacle has not collision points in the black and transparent area
User prompt
create a new shapedobstacle that will have the same behaviour as obstacles with dot. shapedobstcale will be a shape made of many small assets.
User prompt
Obstacles should rotate on their axis
User prompt
Add stars class. When dot intersects with star, add 1 point and destroy star
User prompt
Stars should spawn in the center of x
User prompt
Stars y position should update in relation to dot like obstacles do
User prompt
Spawn on 1 start on game start in the center of the screen
User prompt
On game start dor should be on the bottom.of the screen
User prompt
When a star is destroyed a new one should appear 2000 pixels higher
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'y')' in or related to this line: 'newStar.y = stars[j].y - 2000;' Line Number: 139
User prompt
When a star is destroyed a new one should appear 1000 pixels higher. Should be in the center of the x axis
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'y')' in or related to this line: 'newStar.y = stars[j].y - 1000;' Line Number: 139
Code edit (1 edits merged)
Please save this source code
User prompt
Start should increase and decrease their size
User prompt
Stars should increase and decrease their size constantly
User prompt
Create a new class for StartParticles. This new class will be used to show particles explode in a circular way when a star is destpryes
User prompt
Show starparticles when a star is destroyed
User prompt
Starparticles should spawn form star position when star is destroyes
User prompt
Show score in the top center of the screen
User prompt
Make sure score ia displayes on game start
Code edit (1 edits merged)
Please save this source code
User prompt
the score text object would need to be added to the `LK.gui` overlay at the appropriate position, such as the top center of the screen, using the appropriate method provided by the LK game engine.
===================================================================
--- original.js
+++ change.js
@@ -83,16 +83,17 @@
obstacle.x = obstacle.direction === 1 ? -obstacle.width / 2 : 2048 + obstacle.width / 2;
obstacle.y = Math.random() * (1366 - obstacle.height) + obstacle.height / 2;
obstacles.push(obstacle);
}
-var scoreTxt = new Text2(LK.getScore().toString(), {
+var scoreTxt = new Text2('0', {
size: 150,
fill: "#ffffff"
});
scoreTxt.anchor.set(0.5, 0);
scoreTxt.x = 2048 / 2;
-scoreTxt.y = 500;
+scoreTxt.y = 50;
LK.gui.top.addChild(scoreTxt);
+LK.gui.top.addChild(scoreTxt);
game.on('down', function (obj) {
dot.bounceUp();
});
LK.on('tick', function () {