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 6ac11b67d..60bde8da1 100644 --- a/getting_started/first_2d_game/03.coding_the_player.rst +++ b/getting_started/first_2d_game/03.coding_the_player.rst @@ -487,7 +487,7 @@ this code to the function: public void OnPlayerBodyEntered(PhysicsBody2D body) { Hide(); // Player disappears after being hit. - EmitSignal(nameof(Hit)); + EmitSignal(SignalName.Hit); // Must be deferred as we can't change physics properties on a physics callback. GetNode("CollisionShape2D").SetDeferred("disabled", true); } 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 9e18f2df2..58b10262f 100644 --- a/getting_started/first_2d_game/06.heads_up_display.rst +++ b/getting_started/first_2d_game/06.heads_up_display.rst @@ -112,7 +112,7 @@ Now add this script to ``HUD``: public partial class HUD : CanvasLayer { // Don't forget to rebuild the project so the editor knows about the new signal. - + [Signal] public delegate void StartGameEventHandler(); } @@ -158,7 +158,7 @@ Now add this script to ``HUD``: #endif // HUD_H -We now want to display a message temporarily, +We now want to display a message temporarily, such as "Get Ready", so we add the following code .. tabs:: @@ -304,7 +304,7 @@ signal of ``StartButton``, and add the following code to the new functions: public void OnStartButtonPressed() { GetNode