diff --git a/getting_started/first_2d_game/03.coding_the_player.rst b/getting_started/first_2d_game/03.coding_the_player.rst index a28ef816b5b..adcb9e5e9e8 100644 --- a/getting_started/first_2d_game/03.coding_the_player.rst +++ b/getting_started/first_2d_game/03.coding_the_player.rst @@ -407,6 +407,7 @@ Next, add this code to the function: .. code-tab:: csharp + // We also specified this function name in PascalCase in the editor's connection window. private void OnBodyEntered(Node2D body) { Hide(); // Player disappears after being hit. diff --git a/getting_started/first_2d_game/04.creating_the_enemy.rst b/getting_started/first_2d_game/04.creating_the_enemy.rst index e336bd1136a..72355e85d34 100644 --- a/getting_started/first_2d_game/04.creating_the_enemy.rst +++ b/getting_started/first_2d_game/04.creating_the_enemy.rst @@ -117,6 +117,7 @@ to the ``Mob`` and add this code: .. code-tab:: csharp + // We also specified this function name in PascalCase in the editor's connection window. private void OnVisibleOnScreenNotifier2DScreenExited() { QueueFree(); 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 5df4c279caf..a450ad2f8cb 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 @@ -168,11 +168,13 @@ the other two timers. ``ScoreTimer`` will increment the score by 1. .. code-tab:: csharp + // We also specified this function name in PascalCase in the editor's connection window. private void OnScoreTimerTimeout() { _score++; } + // We also specified this function name in PascalCase in the editor's connection window. private void OnStartTimerTimeout() { GetNode("MobTimer").Start(); @@ -219,6 +221,7 @@ Note that a new instance must be added to the scene using ``add_child()``. .. code-tab:: csharp + // We also specified this function name in PascalCase in the editor's connection window. private void OnMobTimerTimeout() { // Note: Normally it is best to use explicit types rather than the `var` 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 f94e58a06e6..35ce6bd6cca 100644 --- a/getting_started/first_2d_game/06.heads_up_display.rst +++ b/getting_started/first_2d_game/06.heads_up_display.rst @@ -199,12 +199,14 @@ signal of ``MessageTimer``, and add the following code to the new functions: .. code-tab:: csharp + // We also specified this function name in PascalCase in the editor's connection window. private void OnStartButtonPressed() { GetNode