Fix Navigation API abbreviations inconsistency

Schema for navigation to name user facing API with  "navigation" without abbreviation and e.g. NavigationServer internals with abbr "nav".
This commit is contained in:
smix8 2022-12-11 18:02:35 +01:00
parent 10bc1d8710
commit 34e7628f5f
40 changed files with 331 additions and 331 deletions

View file

@ -12,14 +12,14 @@
var outline = PackedVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)])
polygon.add_outline(outline)
polygon.make_polygons_from_outlines()
$NavigationRegion2D.navpoly = polygon
$NavigationRegion2D.navigation_polygon = polygon
[/gdscript]
[csharp]
var polygon = new NavigationPolygon();
var outline = new Vector2[] { new Vector2(0, 0), new Vector2(0, 50), new Vector2(50, 50), new Vector2(50, 0) };
polygon.AddOutline(outline);
polygon.MakePolygonsFromOutlines();
GetNode<NavigationRegion2D>("NavigationRegion2D").Navpoly = polygon;
GetNode<NavigationRegion2D>("NavigationRegion2D").NavigationPolygon = polygon;
[/csharp]
[/codeblocks]
Using [method add_polygon] and indices of the vertices array.
@ -30,7 +30,7 @@
polygon.vertices = vertices
var indices = PackedInt32Array([0, 1, 2, 3])
polygon.add_polygon(indices)
$NavigationRegion2D.navpoly = polygon
$NavigationRegion2D.navigation_polygon = polygon
[/gdscript]
[csharp]
var polygon = new NavigationPolygon();
@ -38,7 +38,7 @@
polygon.Vertices = vertices;
var indices = new int[] { 0, 1, 2, 3 };
polygon.AddPolygon(indices);
GetNode<NavigationRegion2D>("NavigationRegion2D").Navpoly = polygon;
GetNode<NavigationRegion2D>("NavigationRegion2D").NavigationPolygon = polygon;
[/csharp]
[/codeblocks]
</description>
@ -80,10 +80,10 @@
Clears the array of polygons, but it doesn't clear the array of outlines and vertices.
</description>
</method>
<method name="get_mesh">
<method name="get_navigation_mesh">
<return type="NavigationMesh" />
<description>
Returns the [NavigationMesh] resulting from this navigation polygon. This navmesh can be used to update the navmesh of a region with the [method NavigationServer3D.region_set_navmesh] API directly (as 2D uses the 3D server behind the scene).
Returns the [NavigationMesh] resulting from this navigation polygon. This navigation mesh can be used to update the navigation mesh of a region with the [method NavigationServer3D.region_set_navigation_mesh] API directly (as 2D uses the 3D server behind the scene).
</description>
</method>
<method name="get_outline" qualifiers="const">