Browse Source

Update C# code samples in 07.killing_player.rst (#7177)

Fixed two references in code summary
Andrew Cocker 2 years ago
parent
commit
9b35747ba5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      getting_started/first_3d_game/07.killing_player.rst

+ 2 - 2
getting_started/first_3d_game/07.killing_player.rst

@@ -208,7 +208,7 @@ Starting with ``Main.gd``.
 
             // Choose a random location on the SpawnPath.
             // We store the reference to the SpawnLocation node.
-            var mobSpawnLocation = GetNode<PathFollow>("SpawnPath/SpawnLocation");
+            var mobSpawnLocation = GetNode<PathFollow3D>("SpawnPath/SpawnLocation");
             // And give it a random offset.
             mobSpawnLocation.ProgressRatio = GD.Randf();
 
@@ -480,7 +480,7 @@ Finally, the longest script, ``Player.gd``:
             }
 
             // Iterate through all collisions that occurred this frame.
-            for (int index = 0; index < GetSlideCount(); index++)
+            for (int index = 0; index < GetSlideCollisionCount(); index++)
             {
                 // We get one of the collisions with the player.
                 KinematicCollision3D collision = GetSlideCollision(index);