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