Browse Source

Merge pull request #6275 from TheYellowArchitect/patch-2

[2D Game Tutorial] Fixing the last codeblock to run on 4.0
Max Hilbrunner 2 years ago
parent
commit
70133f3712
1 changed files with 2 additions and 2 deletions
  1. 2 2
      getting_started/first_2d_game/06.heads_up_display.rst

+ 2 - 2
getting_started/first_2d_game/06.heads_up_display.rst

@@ -211,12 +211,12 @@ We also need to process what happens when the player loses. The code below will
     func show_game_over():
         show_message("Game Over")
         # Wait until the MessageTimer has counted down.
-        await($MessageTimer, "timeout")
+        await $MessageTimer.timeout
 
         $Message.text = "Dodge the\nCreeps!"
         $Message.show()
         # Make a one-shot timer and wait for it to finish.
-        yield(get_tree().create_timer(1), "timeout")
+        await get_tree().create_timer(1.0).timeout
         $StartButton.show()
 
  .. code-tab:: csharp