Jelajahi Sumber

Fixed "GetNode" inconsistency

See #4794
BlueStag 4 tahun lalu
induk
melakukan
4cfe07b696
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      tutorials/math/vector_math.rst

+ 1 - 1
tutorials/math/vector_math.rst

@@ -69,7 +69,7 @@ pixels down, use the following code:
 
 
  .. code-tab:: csharp
  .. code-tab:: csharp
 
 
-    var node2D = (Node2D) GetNode("Node2D");
+    var node2D = GetNode<Node2D>("Node2D");
     node2D.Position = new Vector2(400, 300);
     node2D.Position = new Vector2(400, 300);
 
 
 Godot supports both :ref:`Vector2 <class_Vector2>` and :ref:`Vector3
 Godot supports both :ref:`Vector2 <class_Vector2>` and :ref:`Vector3