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

Fixed two references in code summary
This commit is contained in:
Andrew Cocker
2023-04-18 16:41:50 +03:00
committed by GitHub
parent deb969b97a
commit 9b35747ba5
@@ -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);