Browse Source

Merge pull request #2248 from Azumgi/patch-1

Fix several C# code errors in "Getting Started" section
Rémi Verschelde 6 years ago
parent
commit
2442e5527d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      getting_started/step_by_step/your_first_game.rst

+ 2 - 2
getting_started/step_by_step/your_first_game.rst

@@ -1037,7 +1037,7 @@ show the "Start" button.
 
     public void UpdateScore(int score)
     {
-        GetNode<Label>("ScoreLabel").Text = _score.ToString();
+        GetNode<Label>("ScoreLabel").Text = score.ToString();
     }
 
 This function is called by ``Main`` whenever the score changes.
@@ -1120,7 +1120,7 @@ sync with the changing score:
 
  .. code-tab:: csharp
 
-        GetNode<HUD>.UpdateScore(_score);
+        GetNode<HUD>("HUD").UpdateScore(_score);
 
 Now you're ready to play! Click the "Play the Project" button. You will
 be asked to select a main scene, so choose ``Main.tscn``.