Merge pull request #6275 from TheYellowArchitect/patch-2

[2D Game Tutorial] Fixing the last codeblock to run on 4.0
This commit is contained in:
Max Hilbrunner
2022-10-07 15:59:33 +02:00
committed by GitHub

View File

@@ -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