User prompt
When star is destroyed show a +1 message where the star was
User prompt
To display the "+1" text properly, the `ScorePopup` class should instantiate a `Text2` object and then add it to the container using the `addChild` method, which is the standard way to add display objects to containers in many game engines, including LK.
Code edit (1 edits merged)
Please save this source code
User prompt
Center scorepop with star considering anchors
Code edit (2 edits merged)
Please save this source code
User prompt
reduce obtacle speed in 30%
User prompt
add effect to scoretxt when it updates
User prompt
add transition effect for scoretxt when its updated
User prompt
when transition effect is done to scoretxt make sure scoretxt always keeps the original y position
Code edit (3 edits merged)
Please save this source code
User prompt
last obstacle added to each start should have a very small dotted line marking its orbit. use little resource for this.
User prompt
draw the orbit of the obstacle arround the star
User prompt
Fix Bug: 'Uncaught TypeError: Graphics is not a constructor' in or related to this line: 'var graphics = new Graphics();' Line Number: 6
User prompt
draw the ciruclar orbit with a dotted line for the obstacle orbit around the star
User prompt
add a small dotted line in circular shape on the trajectory path of the obstacle around the star
User prompt
reduce dotted line dot size 10 times
User prompt
draw a very thin line makring the trajectory of the orbit of the obstacle around the star
User prompt
Fix Bug: 'Uncaught TypeError: Graphics is not a constructor' in or related to this line: 'var lineGraphics = new Graphics();' Line Number: 9
User prompt
Fix Bug: 'Uncaught TypeError: lineGraphics.lineStyle is not a function' in or related to this line: 'lineGraphics.lineStyle(1, 0xffffff, 0.5);' Line Number: 13
User prompt
reduce obstacle orbit speed 25%
User prompt
scoretextfadein should come from up down
User prompt
when star is created add an orbit asset behind
User prompt
orbit asset should increase its size 200 pixels every time a new star is created
User prompt
orbit shoudl increase 200 pixels cumulative every time a new star i screated
User prompt
add dim to orbit
===================================================================
--- original.js
+++ change.js
@@ -264,12 +264,12 @@
if (dot.intersects(stars[j])) {
LK.setScore(LK.getScore() + 1);
scoreTxt.setText(LK.getScore().toString());
scoreTxt.alpha = 0;
- scoreTxt.y -= 50;
+ var originalY = scoreTxt.y;
LK.on('tick', function updateScoreTextFadeIn() {
scoreTxt.alpha += 0.05;
- scoreTxt.y += 1;
+ scoreTxt.y = originalY + (1 - scoreTxt.alpha) * 50;
if (scoreTxt.alpha >= 1) {
scoreTxt.alpha = 1;
LK.off('tick', updateScoreTextFadeIn);
}