Browse Source

Merge pull request #79794 from DarthKitten2130/master

Update outdated C# code sample in `AStarGrid2D` documentation
Yuri Sizov 2 năm trước cách đây
mục cha
commit
9d118c28b4
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      doc/classes/AStarGrid2D.xml

+ 1 - 1
doc/classes/AStarGrid2D.xml

@@ -17,7 +17,7 @@
 		[/gdscript]
 		[csharp]
 		AStarGrid2D astarGrid = new AStarGrid2D();
-		astarGrid.Size = new Vector2I(32, 32);
+		astarGrid.Region = new Rect2I(0, 0, 32, 32);
 		astarGrid.CellSize = new Vector2I(16, 16);
 		astarGrid.Update();
 		GD.Print(astarGrid.GetIdPath(Vector2I.Zero, new Vector2I(3, 4))); // prints (0, 0), (1, 1), (2, 2), (3, 3), (3, 4)