Updated Deprecated Method in C# Example Size to Region

This commit is contained in:
Sathvik Mulukutla 2023-07-22 22:04:38 +05:30 committed by GitHub
parent 6588a4a29a
commit 5b3f14cc82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@
[/gdscript] [/gdscript]
[csharp] [csharp]
AStarGrid2D astarGrid = new AStarGrid2D(); 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.CellSize = new Vector2I(16, 16);
astarGrid.Update(); astarGrid.Update();
GD.Print(astarGrid.GetIdPath(Vector2I.Zero, new Vector2I(3, 4))); // prints (0, 0), (1, 1), (2, 2), (3, 3), (3, 4) GD.Print(astarGrid.GetIdPath(Vector2I.Zero, new Vector2I(3, 4))); // prints (0, 0), (1, 1), (2, 2), (3, 3), (3, 4)