User prompt
If they win level 5, hide the Start and Stop button
Code edit (1 edits merged)
Please save this source code
User prompt
Add to all levels: If they fail they revert to level 1
User prompt
If the player win level 4 they advance to level 5 where: 1. Title text changes to "The 60-min Game" 2. The goal is now to hit 3600 seconds to beat level 5.
User prompt
If the player win level 3 they advance to level 4 where: 1. Title text changes to "The 5-min Game" 2. The goal is now to hit 300 seconds to beat level 3.
User prompt
If the player win level 2 they advance to level 3 where: 1. Title text changes to "The 60-Second Game" 2. The goal is now to hit 60 seconds to beat level 3.
User prompt
If the player win they advance to level 2 where: 1. Title text changes to "The 20-Second Game" 2. The goal is now to hit 20 seconds to beat level 2.
User prompt
Make a level 2 if the player beats level 1 with the following changes: 1. Title text changes to "The 20-Second Game" 2. The goal is now to hit 20 seconds to beat level 2.
Code edit (1 edits merged)
Please save this source code
User prompt
move the title text 200px down
User prompt
make the title font size smaller
User prompt
Add a text label at the top of the screen with the game title "The 10-Second Game" spanning the screen width
User prompt
Make it fit the screen
User prompt
Change the game title text to The 10 Second Game
Code edit (2 edits merged)
Please save this source code
User prompt
Make a text label at the top of the game with the Title of the game
User prompt
I think it would be better to calcultate the placement of StartButton and StopButton, to be the same as timerTxt, but move the Buttons down 300px
Code edit (1 edits merged)
Please save this source code
User prompt
What if I would like the placement to be in the center of the the screen width, and buttom+200px
User prompt
Move Start/StopButton to Center.Y +300px, but keep X centered
User prompt
Move Start/StopButton to Center.Y - 200px
User prompt
Move the Start/StopButton to 2/3 of the screen height
User prompt
The Start/Stop Button is to far down
Initial prompt
10 Seconds
===================================================================
--- original.js
+++ change.js
@@ -22,19 +22,19 @@
var startButton = new Text2('Start', {
size: 100,
fill: "#00ff00"
});
-startButton.anchor.set(0.5, 0.5);
-startButton.y = LK.gui.center.y + 300;
-LK.gui.addChild(startButton);
+startButton.anchor.set(0.5, 1);
+startButton.y = -200;
+LK.gui.bottom.addChild(startButton);
// Initialize the stop button
var stopButton = new Text2('Stop', {
size: 100,
fill: "#ff0000"
});
-stopButton.anchor.set(0.5, 0.5);
-stopButton.y = LK.gui.center.y + 300;
-LK.gui.addChild(stopButton);
+stopButton.anchor.set(0.5, 1);
+stopButton.y = -200;
+LK.gui.bottom.addChild(stopButton);
stopButton.visible = false;
// Variables to keep track of time
var startTime = 0;
var elapsedTime = 0;