From 5b9f7c62251ffa9182bd0e4558bede36dde4c218 Mon Sep 17 00:00:00 2001 From: Luiz Gustavo Date: Mon, 9 Oct 2023 22:42:30 -0300 Subject: [PATCH] Removed redundancy and better wording. --- getting_started/first_2d_game/06.heads_up_display.rst | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/getting_started/first_2d_game/06.heads_up_display.rst b/getting_started/first_2d_game/06.heads_up_display.rst index 3c3e6e41a57..80d6a57924c 100644 --- a/getting_started/first_2d_game/06.heads_up_display.rst +++ b/getting_started/first_2d_game/06.heads_up_display.rst @@ -331,15 +331,13 @@ should look like this, so make sure you didn't miss anything: Now we need to connect the ``HUD`` functionality to our ``Main`` script. This requires a few additions to the ``Main`` scene: -In the Node tab, connect the HUD's ``start_game`` signal to the ``new_game()`` +First, we don't want to start the new game automatically, so remove the call to ``new_game()`` +in ``_ready()``. Then, in the Node tab, connect the HUD's ``start_game`` signal to the ``new_game()`` function of the Main node by clicking the "Pick" button in the "Connect a Signal" window and selecting the ``new_game()`` method or type "new_game" below "Receiver Method" in the window. Verify that the green connection icon now appears next to ``func new_game()`` in the script. -Remember to remove the call to ``new_game()`` from -``_ready()``. - In ``new_game()``, update the score display and show the "Get Ready" message: .. tabs:: @@ -374,8 +372,6 @@ In ``game_over()`` we need to call the corresponding ``HUD`` function: _hud->show_game_over(); -Just a reminder: we don't want to start the new game automatically, so -remove the call to ``new_game()`` in ``_ready()`` if you haven't yet. Finally, add this to ``_on_score_timer_timeout()`` to keep the display in sync with the changing score: