classref: Sync with current master branch (d34594179)

This commit is contained in:
Rémi Verschelde
2022-12-19 17:07:53 +01:00
parent 3924eb1a89
commit ad86ceb689
74 changed files with 3594 additions and 1086 deletions

View File

@@ -57,7 +57,7 @@ Methods
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`agent_is_map_changed<class_NavigationServer2D_method_agent_is_map_changed>` **(** :ref:`RID<class_RID>` agent **)** |const| |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`agent_set_callback<class_NavigationServer2D_method_agent_set_callback>` **(** :ref:`RID<class_RID>` agent, :ref:`Object<class_Object>` receiver, :ref:`StringName<class_StringName>` method, :ref:`Variant<class_Variant>` userdata=null **)** |const| |
| void | :ref:`agent_set_callback<class_NavigationServer2D_method_agent_set_callback>` **(** :ref:`RID<class_RID>` agent, :ref:`int<class_int>` object_id, :ref:`StringName<class_StringName>` method, :ref:`Variant<class_Variant>` userdata=null **)** |const| |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`agent_set_map<class_NavigationServer2D_method_agent_set_map>` **(** :ref:`RID<class_RID>` agent, :ref:`RID<class_RID>` map **)** |const| |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
@@ -91,6 +91,8 @@ Methods
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`link_get_navigation_layers<class_NavigationServer2D_method_link_get_navigation_layers>` **(** :ref:`RID<class_RID>` link **)** |const| |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`link_get_owner_id<class_NavigationServer2D_method_link_get_owner_id>` **(** :ref:`RID<class_RID>` link **)** |const| |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Vector2<class_Vector2>` | :ref:`link_get_start_location<class_NavigationServer2D_method_link_get_start_location>` **(** :ref:`RID<class_RID>` link **)** |const| |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`link_get_travel_cost<class_NavigationServer2D_method_link_get_travel_cost>` **(** :ref:`RID<class_RID>` link **)** |const| |
@@ -107,6 +109,8 @@ Methods
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`link_set_navigation_layers<class_NavigationServer2D_method_link_set_navigation_layers>` **(** :ref:`RID<class_RID>` link, :ref:`int<class_int>` navigation_layers **)** |const| |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`link_set_owner_id<class_NavigationServer2D_method_link_set_owner_id>` **(** :ref:`RID<class_RID>` link, :ref:`int<class_int>` owner_id **)** |const| |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`link_set_start_location<class_NavigationServer2D_method_link_set_start_location>` **(** :ref:`RID<class_RID>` link, :ref:`Vector2<class_Vector2>` location **)** |const| |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`link_set_travel_cost<class_NavigationServer2D_method_link_set_travel_cost>` **(** :ref:`RID<class_RID>` link, :ref:`float<class_float>` travel_cost **)** |const| |
@@ -159,6 +163,8 @@ Methods
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`region_get_navigation_layers<class_NavigationServer2D_method_region_get_navigation_layers>` **(** :ref:`RID<class_RID>` region **)** |const| |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`region_get_owner_id<class_NavigationServer2D_method_region_get_owner_id>` **(** :ref:`RID<class_RID>` region **)** |const| |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`region_get_travel_cost<class_NavigationServer2D_method_region_get_travel_cost>` **(** :ref:`RID<class_RID>` region **)** |const| |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`region_owns_point<class_NavigationServer2D_method_region_owns_point>` **(** :ref:`RID<class_RID>` region, :ref:`Vector2<class_Vector2>` point **)** |const| |
@@ -169,7 +175,9 @@ Methods
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`region_set_navigation_layers<class_NavigationServer2D_method_region_set_navigation_layers>` **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` navigation_layers **)** |const| |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`region_set_navpoly<class_NavigationServer2D_method_region_set_navpoly>` **(** :ref:`RID<class_RID>` region, :ref:`NavigationPolygon<class_NavigationPolygon>` nav_poly **)** |const| |
| void | :ref:`region_set_navigation_polygon<class_NavigationServer2D_method_region_set_navigation_polygon>` **(** :ref:`RID<class_RID>` region, :ref:`NavigationPolygon<class_NavigationPolygon>` navigation_polygon **)** |const| |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`region_set_owner_id<class_NavigationServer2D_method_region_set_owner_id>` **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` owner_id **)** |const| |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`region_set_transform<class_NavigationServer2D_method_region_set_transform>` **(** :ref:`RID<class_RID>` region, :ref:`Transform2D<class_Transform2D>` transform **)** |const| |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
@@ -242,11 +250,11 @@ Returns true if the map got changed the previous frame.
.. rst-class:: classref-method
void **agent_set_callback** **(** :ref:`RID<class_RID>` agent, :ref:`Object<class_Object>` receiver, :ref:`StringName<class_StringName>` method, :ref:`Variant<class_Variant>` userdata=null **)** |const|
void **agent_set_callback** **(** :ref:`RID<class_RID>` agent, :ref:`int<class_int>` object_id, :ref:`StringName<class_StringName>` method, :ref:`Variant<class_Variant>` userdata=null **)** |const|
Callback called at the end of the RVO process. If a callback is created manually and the agent is placed on a navigation map it will calculate avoidance for the agent and dispatch the calculated ``safe_velocity`` to the ``receiver`` object with a signal to the chosen ``method`` name.
Sets the callback ``object_id`` and ``method`` that gets called after each avoidance processing step for the ``agent``. The calculated ``safe_velocity`` will be dispatched with a signal to the object just before the physics calculations.
\ **Note:** Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use :ref:`agent_set_callback<class_NavigationServer2D_method_agent_set_callback>` again with a ``null`` object as the ``receiver``.
\ **Note:** Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use :ref:`agent_set_callback<class_NavigationServer2D_method_agent_set_callback>` again with a ``0`` ObjectID as the ``object_id``.
.. rst-class:: classref-item-separator
@@ -444,6 +452,18 @@ Returns the navigation layers for this ``link``.
----
.. _class_NavigationServer2D_method_link_get_owner_id:
.. rst-class:: classref-method
:ref:`int<class_int>` **link_get_owner_id** **(** :ref:`RID<class_RID>` link **)** |const|
Returns the ``ObjectID`` of the object which manages this link.
.. rst-class:: classref-item-separator
----
.. _class_NavigationServer2D_method_link_get_start_location:
.. rst-class:: classref-method
@@ -540,6 +560,18 @@ Set the links's navigation layers. This allows selecting links from a path reque
----
.. _class_NavigationServer2D_method_link_set_owner_id:
.. rst-class:: classref-method
void **link_set_owner_id** **(** :ref:`RID<class_RID>` link, :ref:`int<class_int>` owner_id **)** |const|
Set the ``ObjectID`` of the object which manages this link.
.. rst-class:: classref-item-separator
----
.. _class_NavigationServer2D_method_link_set_start_location:
.. rst-class:: classref-method
@@ -858,6 +890,18 @@ Returns the region's navigation layers.
----
.. _class_NavigationServer2D_method_region_get_owner_id:
.. rst-class:: classref-method
:ref:`int<class_int>` **region_get_owner_id** **(** :ref:`RID<class_RID>` region **)** |const|
Returns the ``ObjectID`` of the object which manages this region.
.. rst-class:: classref-item-separator
----
.. _class_NavigationServer2D_method_region_get_travel_cost:
.. rst-class:: classref-method
@@ -922,13 +966,25 @@ Set the region's navigation layers. This allows selecting regions from a path re
----
.. _class_NavigationServer2D_method_region_set_navpoly:
.. _class_NavigationServer2D_method_region_set_navigation_polygon:
.. rst-class:: classref-method
void **region_set_navpoly** **(** :ref:`RID<class_RID>` region, :ref:`NavigationPolygon<class_NavigationPolygon>` nav_poly **)** |const|
void **region_set_navigation_polygon** **(** :ref:`RID<class_RID>` region, :ref:`NavigationPolygon<class_NavigationPolygon>` navigation_polygon **)** |const|
Sets the navigation mesh for the region.
Sets the ``navigation_polygon`` for the region.
.. rst-class:: classref-item-separator
----
.. _class_NavigationServer2D_method_region_set_owner_id:
.. rst-class:: classref-method
void **region_set_owner_id** **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` owner_id **)** |const|
Set the ``ObjectID`` of the object which manages this region.
.. rst-class:: classref-item-separator