Add NavigationServer API to enable regions and links

Adds NavigationServer API to enable regions and links.
This commit is contained in:
smix8 2023-07-06 23:01:19 +02:00
parent 202e4b2c1e
commit 69fad39cf5
18 changed files with 159 additions and 36 deletions

View file

@ -207,6 +207,13 @@
Create a new link between two positions on a map.
</description>
</method>
<method name="link_get_enabled" qualifiers="const">
<return type="bool" />
<param index="0" name="link" type="RID" />
<description>
Returns [code]true[/code] if the specified [param link] is enabled.
</description>
</method>
<method name="link_get_end_position" qualifiers="const">
<return type="Vector2" />
<param index="0" name="link" type="RID" />
@ -271,6 +278,14 @@
Sets whether this [param link] can be travelled in both directions.
</description>
</method>
<method name="link_set_enabled">
<return type="void" />
<param index="0" name="link" type="RID" />
<param index="1" name="enabled" type="bool" />
<description>
If [param enabled] is [code]true[/code] the specified [param link] will contribute to its current navigation map.
</description>
</method>
<method name="link_set_end_position">
<return type="void" />
<param index="0" name="link" type="RID" />
@ -601,6 +616,13 @@
Returns how many connections this [param region] has with other regions in the map.
</description>
</method>
<method name="region_get_enabled" qualifiers="const">
<return type="bool" />
<param index="0" name="region" type="RID" />
<description>
Returns [code]true[/code] if the specified [param region] is enabled.
</description>
</method>
<method name="region_get_enter_cost" qualifiers="const">
<return type="float" />
<param index="0" name="region" type="RID" />
@ -653,6 +675,14 @@
[b]Note:[/b] If navigation meshes from different navigation regions overlap (which should be avoided in general) the result might not be what is expected.
</description>
</method>
<method name="region_set_enabled">
<return type="void" />
<param index="0" name="region" type="RID" />
<param index="1" name="enabled" type="bool" />
<description>
If [param enabled] is [code]true[/code] the specified [param region] will contribute to its current navigation map.
</description>
</method>
<method name="region_set_enter_cost">
<return type="void" />
<param index="0" name="region" type="RID" />