From 72216483eb8721a40512c39925d60f93a9bbfdea Mon Sep 17 00:00:00 2001 From: Gabriel Ford Date: Wed, 22 Mar 2023 10:53:37 -0400 Subject: [PATCH] Fix incorrect auto-generated signal names In https://github.com/godotengine/godot-docs/issues/7028 it is noted that the autogenerated signal names for "Your first 2D game" are in the wrong case. They are PascalCase in the docs but in the engine they are snake_case in the latest stable 4.0. fixes #7028 --- getting_started/first_2d_game/05.the_main_game_scene.rst | 6 +++--- getting_started/first_2d_game/06.heads_up_display.rst | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/getting_started/first_2d_game/05.the_main_game_scene.rst b/getting_started/first_2d_game/05.the_main_game_scene.rst index be2e85f14..20e62b307 100644 --- a/getting_started/first_2d_game/05.the_main_game_scene.rst +++ b/getting_started/first_2d_game/05.the_main_game_scene.rst @@ -246,10 +246,10 @@ the other two timers. ``ScoreTimer`` will increment the score by 1. .. tabs:: .. code-tab:: gdscript GDScript - func _on_ScoreTimer_timeout(): + func _on_score_timer_timeout(): score += 1 - func _on_StartTimer_timeout(): + func _on_start_timer_timeout(): $MobTimer.start() $ScoreTimer.start() @@ -302,7 +302,7 @@ Note that a new instance must be added to the scene using ``add_child()``. .. tabs:: .. code-tab:: gdscript GDScript - func _on_MobTimer_timeout(): + func _on_mob_timer_timeout(): # Create a new instance of the Mob scene. var mob = mob_scene.instantiate() 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 217d8a05e..f04838dde 100644 --- a/getting_started/first_2d_game/06.heads_up_display.rst +++ b/getting_started/first_2d_game/06.heads_up_display.rst @@ -297,11 +297,11 @@ signal of ``StartButton``, and add the following code to the new functions: .. tabs:: .. code-tab:: gdscript GDScript - func _on_StartButton_pressed(): + func _on_start_button_pressed(): $StartButton.hide() start_game.emit() - func _on_MessageTimer_timeout(): + func _on_message_timer_timeout(): $Message.hide() .. code-tab:: csharp