|
@@ -61,55 +61,55 @@ Methods
|
|
.. table::
|
|
.. table::
|
|
:widths: auto
|
|
:widths: auto
|
|
|
|
|
|
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
- | void | :ref:`add_collision_polygon<class_TileData_method_add_collision_polygon>` **(** :ref:`int<class_int>` layer_id **)** |
|
|
|
|
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
- | :ref:`float<class_float>` | :ref:`get_collision_polygon_one_way_margin<class_TileData_method_get_collision_polygon_one_way_margin>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index **)** |const| |
|
|
|
|
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
- | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`get_collision_polygon_points<class_TileData_method_get_collision_polygon_points>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index **)** |const| |
|
|
|
|
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
- | :ref:`int<class_int>` | :ref:`get_collision_polygons_count<class_TileData_method_get_collision_polygons_count>` **(** :ref:`int<class_int>` layer_id **)** |const| |
|
|
|
|
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
- | :ref:`float<class_float>` | :ref:`get_constant_angular_velocity<class_TileData_method_get_constant_angular_velocity>` **(** :ref:`int<class_int>` layer_id **)** |const| |
|
|
|
|
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
- | :ref:`Vector2<class_Vector2>` | :ref:`get_constant_linear_velocity<class_TileData_method_get_constant_linear_velocity>` **(** :ref:`int<class_int>` layer_id **)** |const| |
|
|
|
|
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
- | :ref:`Variant<class_Variant>` | :ref:`get_custom_data<class_TileData_method_get_custom_data>` **(** :ref:`String<class_String>` layer_name **)** |const| |
|
|
|
|
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
- | :ref:`Variant<class_Variant>` | :ref:`get_custom_data_by_layer_id<class_TileData_method_get_custom_data_by_layer_id>` **(** :ref:`int<class_int>` layer_id **)** |const| |
|
|
|
|
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
- | :ref:`NavigationPolygon<class_NavigationPolygon>` | :ref:`get_navigation_polygon<class_TileData_method_get_navigation_polygon>` **(** :ref:`int<class_int>` layer_id **)** |const| |
|
|
|
|
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
- | :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` | :ref:`get_occluder<class_TileData_method_get_occluder>` **(** :ref:`int<class_int>` layer_id **)** |const| |
|
|
|
|
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
- | :ref:`int<class_int>` | :ref:`get_terrain_peering_bit<class_TileData_method_get_terrain_peering_bit>` **(** :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` peering_bit **)** |const| |
|
|
|
|
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
- | :ref:`bool<class_bool>` | :ref:`is_collision_polygon_one_way<class_TileData_method_is_collision_polygon_one_way>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index **)** |const| |
|
|
|
|
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
- | void | :ref:`remove_collision_polygon<class_TileData_method_remove_collision_polygon>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index **)** |
|
|
|
|
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
- | void | :ref:`set_collision_polygon_one_way<class_TileData_method_set_collision_polygon_one_way>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index, :ref:`bool<class_bool>` one_way **)** |
|
|
|
|
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
- | void | :ref:`set_collision_polygon_one_way_margin<class_TileData_method_set_collision_polygon_one_way_margin>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index, :ref:`float<class_float>` one_way_margin **)** |
|
|
|
|
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
- | void | :ref:`set_collision_polygon_points<class_TileData_method_set_collision_polygon_points>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index, :ref:`PackedVector2Array<class_PackedVector2Array>` polygon **)** |
|
|
|
|
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
- | void | :ref:`set_collision_polygons_count<class_TileData_method_set_collision_polygons_count>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygons_count **)** |
|
|
|
|
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
- | void | :ref:`set_constant_angular_velocity<class_TileData_method_set_constant_angular_velocity>` **(** :ref:`int<class_int>` layer_id, :ref:`float<class_float>` velocity **)** |
|
|
|
|
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
- | void | :ref:`set_constant_linear_velocity<class_TileData_method_set_constant_linear_velocity>` **(** :ref:`int<class_int>` layer_id, :ref:`Vector2<class_Vector2>` velocity **)** |
|
|
|
|
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
- | void | :ref:`set_custom_data<class_TileData_method_set_custom_data>` **(** :ref:`String<class_String>` layer_name, :ref:`Variant<class_Variant>` value **)** |
|
|
|
|
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
- | void | :ref:`set_custom_data_by_layer_id<class_TileData_method_set_custom_data_by_layer_id>` **(** :ref:`int<class_int>` layer_id, :ref:`Variant<class_Variant>` value **)** |
|
|
|
|
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
- | void | :ref:`set_navigation_polygon<class_TileData_method_set_navigation_polygon>` **(** :ref:`int<class_int>` layer_id, :ref:`NavigationPolygon<class_NavigationPolygon>` navigation_polygon **)** |
|
|
|
|
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
- | void | :ref:`set_occluder<class_TileData_method_set_occluder>` **(** :ref:`int<class_int>` layer_id, :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` occluder_polygon **)** |
|
|
|
|
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
- | void | :ref:`set_terrain_peering_bit<class_TileData_method_set_terrain_peering_bit>` **(** :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` peering_bit, :ref:`int<class_int>` terrain **)** |
|
|
|
|
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
|
|
+ +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
+ | void | :ref:`add_collision_polygon<class_TileData_method_add_collision_polygon>` **(** :ref:`int<class_int>` layer_id **)** |
|
|
|
|
+ +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
+ | :ref:`float<class_float>` | :ref:`get_collision_polygon_one_way_margin<class_TileData_method_get_collision_polygon_one_way_margin>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index **)** |const| |
|
|
|
|
+ +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
+ | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`get_collision_polygon_points<class_TileData_method_get_collision_polygon_points>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index **)** |const| |
|
|
|
|
+ +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
+ | :ref:`int<class_int>` | :ref:`get_collision_polygons_count<class_TileData_method_get_collision_polygons_count>` **(** :ref:`int<class_int>` layer_id **)** |const| |
|
|
|
|
+ +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
+ | :ref:`float<class_float>` | :ref:`get_constant_angular_velocity<class_TileData_method_get_constant_angular_velocity>` **(** :ref:`int<class_int>` layer_id **)** |const| |
|
|
|
|
+ +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
+ | :ref:`Vector2<class_Vector2>` | :ref:`get_constant_linear_velocity<class_TileData_method_get_constant_linear_velocity>` **(** :ref:`int<class_int>` layer_id **)** |const| |
|
|
|
|
+ +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
+ | :ref:`Variant<class_Variant>` | :ref:`get_custom_data<class_TileData_method_get_custom_data>` **(** :ref:`String<class_String>` layer_name **)** |const| |
|
|
|
|
+ +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
+ | :ref:`Variant<class_Variant>` | :ref:`get_custom_data_by_layer_id<class_TileData_method_get_custom_data_by_layer_id>` **(** :ref:`int<class_int>` layer_id **)** |const| |
|
|
|
|
+ +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
+ | :ref:`NavigationPolygon<class_NavigationPolygon>` | :ref:`get_navigation_polygon<class_TileData_method_get_navigation_polygon>` **(** :ref:`int<class_int>` layer_id, :ref:`bool<class_bool>` flip_h=false, :ref:`bool<class_bool>` flip_v=false, :ref:`bool<class_bool>` transpose=false **)** |const| |
|
|
|
|
+ +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
+ | :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` | :ref:`get_occluder<class_TileData_method_get_occluder>` **(** :ref:`int<class_int>` layer_id, :ref:`bool<class_bool>` flip_h=false, :ref:`bool<class_bool>` flip_v=false, :ref:`bool<class_bool>` transpose=false **)** |const| |
|
|
|
|
+ +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
+ | :ref:`int<class_int>` | :ref:`get_terrain_peering_bit<class_TileData_method_get_terrain_peering_bit>` **(** :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` peering_bit **)** |const| |
|
|
|
|
+ +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
+ | :ref:`bool<class_bool>` | :ref:`is_collision_polygon_one_way<class_TileData_method_is_collision_polygon_one_way>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index **)** |const| |
|
|
|
|
+ +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
+ | void | :ref:`remove_collision_polygon<class_TileData_method_remove_collision_polygon>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index **)** |
|
|
|
|
+ +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
+ | void | :ref:`set_collision_polygon_one_way<class_TileData_method_set_collision_polygon_one_way>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index, :ref:`bool<class_bool>` one_way **)** |
|
|
|
|
+ +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
+ | void | :ref:`set_collision_polygon_one_way_margin<class_TileData_method_set_collision_polygon_one_way_margin>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index, :ref:`float<class_float>` one_way_margin **)** |
|
|
|
|
+ +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
+ | void | :ref:`set_collision_polygon_points<class_TileData_method_set_collision_polygon_points>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index, :ref:`PackedVector2Array<class_PackedVector2Array>` polygon **)** |
|
|
|
|
+ +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
+ | void | :ref:`set_collision_polygons_count<class_TileData_method_set_collision_polygons_count>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygons_count **)** |
|
|
|
|
+ +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
+ | void | :ref:`set_constant_angular_velocity<class_TileData_method_set_constant_angular_velocity>` **(** :ref:`int<class_int>` layer_id, :ref:`float<class_float>` velocity **)** |
|
|
|
|
+ +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
+ | void | :ref:`set_constant_linear_velocity<class_TileData_method_set_constant_linear_velocity>` **(** :ref:`int<class_int>` layer_id, :ref:`Vector2<class_Vector2>` velocity **)** |
|
|
|
|
+ +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
+ | void | :ref:`set_custom_data<class_TileData_method_set_custom_data>` **(** :ref:`String<class_String>` layer_name, :ref:`Variant<class_Variant>` value **)** |
|
|
|
|
+ +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
+ | void | :ref:`set_custom_data_by_layer_id<class_TileData_method_set_custom_data_by_layer_id>` **(** :ref:`int<class_int>` layer_id, :ref:`Variant<class_Variant>` value **)** |
|
|
|
|
+ +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
+ | void | :ref:`set_navigation_polygon<class_TileData_method_set_navigation_polygon>` **(** :ref:`int<class_int>` layer_id, :ref:`NavigationPolygon<class_NavigationPolygon>` navigation_polygon **)** |
|
|
|
|
+ +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
+ | void | :ref:`set_occluder<class_TileData_method_set_occluder>` **(** :ref:`int<class_int>` layer_id, :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` occluder_polygon **)** |
|
|
|
|
+ +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
+ | void | :ref:`set_terrain_peering_bit<class_TileData_method_set_terrain_peering_bit>` **(** :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` peering_bit, :ref:`int<class_int>` terrain **)** |
|
|
|
|
+ +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
|
|
.. rst-class:: classref-section-separator
|
|
.. rst-class:: classref-section-separator
|
|
|
|
|
|
@@ -429,10 +429,12 @@ Returns the custom data value for custom data layer with index ``layer_id``.
|
|
|
|
|
|
.. rst-class:: classref-method
|
|
.. rst-class:: classref-method
|
|
|
|
|
|
-:ref:`NavigationPolygon<class_NavigationPolygon>` **get_navigation_polygon** **(** :ref:`int<class_int>` layer_id **)** |const|
|
|
|
|
|
|
+:ref:`NavigationPolygon<class_NavigationPolygon>` **get_navigation_polygon** **(** :ref:`int<class_int>` layer_id, :ref:`bool<class_bool>` flip_h=false, :ref:`bool<class_bool>` flip_v=false, :ref:`bool<class_bool>` transpose=false **)** |const|
|
|
|
|
|
|
Returns the navigation polygon of the tile for the TileSet navigation layer with index ``layer_id``.
|
|
Returns the navigation polygon of the tile for the TileSet navigation layer with index ``layer_id``.
|
|
|
|
|
|
|
|
+\ ``flip_h``, ``flip_v``, and ``transpose`` allow transforming the returned polygon.
|
|
|
|
+
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
----
|
|
----
|
|
@@ -441,10 +443,12 @@ Returns the navigation polygon of the tile for the TileSet navigation layer with
|
|
|
|
|
|
.. rst-class:: classref-method
|
|
.. rst-class:: classref-method
|
|
|
|
|
|
-:ref:`OccluderPolygon2D<class_OccluderPolygon2D>` **get_occluder** **(** :ref:`int<class_int>` layer_id **)** |const|
|
|
|
|
|
|
+:ref:`OccluderPolygon2D<class_OccluderPolygon2D>` **get_occluder** **(** :ref:`int<class_int>` layer_id, :ref:`bool<class_bool>` flip_h=false, :ref:`bool<class_bool>` flip_v=false, :ref:`bool<class_bool>` transpose=false **)** |const|
|
|
|
|
|
|
Returns the occluder polygon of the tile for the TileSet occlusion layer with index ``layer_id``.
|
|
Returns the occluder polygon of the tile for the TileSet occlusion layer with index ``layer_id``.
|
|
|
|
|
|
|
|
+\ ``flip_h``, ``flip_v``, and ``transpose`` allow transforming the returned polygon.
|
|
|
|
+
|
|
.. rst-class:: classref-item-separator
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
|
----
|
|
----
|