Skip to content

Commit d99a882

Browse files
Fix minor issues in Your first 2D game (godotengine#8129)
- The `Dodge the Creeps!` string was not consistent through the page. - The `\n` was removed from the Label Text because the Label should do the wrapping. - There were two reminders to remove the `new_game()` call with only a few lines in between.
1 parent 6bf14ca commit d99a882

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

getting_started/first_2d_game/06.heads_up_display.rst

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ ScoreLabel
6565
Message
6666
~~~~~~~~~~~~
6767

68-
1. Add the text ``Dodge the creeps!``.
68+
1. Add the text ``Dodge the Creeps!``.
6969
2. Set the "Horizontal Alignment" and "Vertical Alignment" to ``Center``.
7070
3. Set the "Autowrap Mode" to ``Word``, otherwise the label will stay on one line.
7171
4. Under "Control - Layout/Transform" set "Size X" to ``480`` to use the entire width of the screen.
@@ -203,7 +203,7 @@ We also need to process what happens when the player loses. The code below will
203203
# Wait until the MessageTimer has counted down.
204204
await $MessageTimer.timeout
205205

206-
$Message.text = "Dodge the\nCreeps!"
206+
$Message.text = "Dodge the Creeps!"
207207
$Message.show()
208208
# Make a one-shot timer and wait for it to finish.
209209
await get_tree().create_timer(1.0).timeout
@@ -219,7 +219,7 @@ We also need to process what happens when the player loses. The code below will
219219
await ToSignal(messageTimer, Timer.SignalName.Timeout);
220220

221221
var message = GetNode<Label>("Message");
222-
message.Text = "Dodge the\nCreeps!";
222+
message.Text = "Dodge the Creeps!";
223223
message.Show();
224224

225225
await ToSignal(GetTree().CreateTimer(1.0), SceneTreeTimer.SignalName.Timeout);
@@ -310,7 +310,7 @@ signal of ``StartButton``, and add the following code to the new functions:
310310
}
311311

312312
void HUD::_on_StartMessageTimer_timeout() {
313-
_message_label->set_text("Dodge the\nCreeps");
313+
_message_label->set_text("Dodge the Creeps!");
314314
_message_label->show();
315315
_start_button_timer->start();
316316
}
@@ -337,9 +337,6 @@ window and selecting the ``new_game()`` method or type "new_game" below "Receive
337337
in the window. Verify that the green connection icon now appears next to
338338
``func new_game()`` in the script.
339339

340-
Remember to remove the call to ``new_game()`` from
341-
``_ready()``.
342-
343340
In ``new_game()``, update the score display and show the "Get Ready" message:
344341

345342
.. tabs::

0 commit comments

Comments
 (0)