From 3b36a94d355099570780793bff6891bda3f4c27a Mon Sep 17 00:00:00 2001 From: Raul Santos Date: Fri, 26 Aug 2022 15:59:43 +0200 Subject: [PATCH] Update C# signal documentation Updates C# signal documentation and code examples to the new API in 4.0 --- .../first_2d_game/03.coding_the_player.rst | 2 +- .../first_2d_game/06.heads_up_display.rst | 4 ++-- .../first_3d_game/06.jump_and_squash.rst | 2 +- .../first_3d_game/07.killing_player.rst | 6 +++--- .../first_3d_game/08.score_and_replay.rst | 4 ++-- .../first_3d_game/09.adding_animations.rst | 4 ++-- getting_started/step_by_step/signals.rst | 4 ++-- tutorials/best_practices/godot_notifications.rst | 8 ++++++-- tutorials/networking/http_request_class.rst | 4 ++-- tutorials/plugins/editor/making_plugins.rst | 2 +- .../scripting/c_sharp/c_sharp_differences.rst | 5 +++-- tutorials/scripting/c_sharp/c_sharp_features.rst | 16 ++++++++-------- tutorials/scripting/instancing_with_signals.rst | 2 +- 13 files changed, 34 insertions(+), 29 deletions(-) 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 ec10a528a5a..15daeac2e1f 100644 --- a/getting_started/first_2d_game/03.coding_the_player.rst +++ b/getting_started/first_2d_game/03.coding_the_player.rst @@ -438,7 +438,7 @@ Add the following at the top of the script. If you're using GDScript, add it aft // Don't forget to rebuild the project so the editor knows about the new signal. [Signal] - public delegate void Hit(); + public delegate void HitEventHandler(); .. code-tab:: cpp 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 34955367a3f..d165eaf3265 100644 --- a/getting_started/first_2d_game/06.heads_up_display.rst +++ b/getting_started/first_2d_game/06.heads_up_display.rst @@ -111,7 +111,7 @@ Now add this script to ``HUD``: // Don't forget to rebuild the project so the editor knows about the new signal. [Signal] - public delegate void StartGame(); + public delegate void StartGameEventHandler(); } .. code-tab:: cpp @@ -302,7 +302,7 @@ signal of ``StartButton`` and add the following code to the new functions: public void OnStartButtonPressed() { GetNode