Files
godot-docs-l10n/classes/zh_Hant/class_tileset.rst

1621 lines
110 KiB
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

:github_url: hide
.. _class_TileSet:
TileSet
=======
**繼承:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
Tilemap 的圖塊庫。
.. rst-class:: classref-introduction-group
說明
----
A TileSet is a library of tiles for a :ref:`TileMapLayer<class_TileMapLayer>`. A TileSet handles a list of :ref:`TileSetSource<class_TileSetSource>`, each of them storing a set of tiles.
Tiles can either be from a :ref:`TileSetAtlasSource<class_TileSetAtlasSource>`, which renders tiles out of a texture with support for physics, navigation, etc., or from a :ref:`TileSetScenesCollectionSource<class_TileSetScenesCollectionSource>`, which exposes scene-based tiles.
Tiles are referenced by using three IDs: their source ID, their atlas coordinates ID, and their alternative tile ID.
A TileSet can be configured so that its tiles expose more or fewer properties. To do so, the TileSet resources use property layers, which you can add or remove depending on your needs.
For example, adding a physics layer allows giving collision shapes to your tiles. Each layer has dedicated properties (physics layer and mask), so you may add several TileSet physics layers for each type of collision you need.
See the functions to add new layers for more information.
.. rst-class:: classref-introduction-group
教學
----
- :doc:`使用 Tilemap <../tutorials/2d/using_tilemaps>`
- `2D 平台範例 <https://godotengine.org/asset-library/asset/2727>`__
- `2D 等軸演示 <https://godotengine.org/asset-library/asset/2718>`__
- `2D 六邊形演示 <https://godotengine.org/asset-library/asset/2717>`__
- `2D Grid-based Navigation with AStarGrid2D Demo <https://godotengine.org/asset-library/asset/2723>`__
- `2D 角色扮演遊戲範例 <https://godotengine.org/asset-library/asset/2729>`__
- `2D 運動學角色演示 <https://godotengine.org/asset-library/asset/2719>`__
.. rst-class:: classref-reftable-group
屬性
----
.. table::
:widths: auto
+----------------------------------------------------+------------------------------------------------------------------+----------------------+
| :ref:`TileLayout<enum_TileSet_TileLayout>` | :ref:`tile_layout<class_TileSet_property_tile_layout>` | ``0`` |
+----------------------------------------------------+------------------------------------------------------------------+----------------------+
| :ref:`TileOffsetAxis<enum_TileSet_TileOffsetAxis>` | :ref:`tile_offset_axis<class_TileSet_property_tile_offset_axis>` | ``0`` |
+----------------------------------------------------+------------------------------------------------------------------+----------------------+
| :ref:`TileShape<enum_TileSet_TileShape>` | :ref:`tile_shape<class_TileSet_property_tile_shape>` | ``0`` |
+----------------------------------------------------+------------------------------------------------------------------+----------------------+
| :ref:`Vector2i<class_Vector2i>` | :ref:`tile_size<class_TileSet_property_tile_size>` | ``Vector2i(16, 16)`` |
+----------------------------------------------------+------------------------------------------------------------------+----------------------+
| :ref:`bool<class_bool>` | :ref:`uv_clipping<class_TileSet_property_uv_clipping>` | ``false`` |
+----------------------------------------------------+------------------------------------------------------------------+----------------------+
.. rst-class:: classref-reftable-group
方法
----
.. table::
:widths: auto
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_custom_data_layer<class_TileSet_method_add_custom_data_layer>`\ (\ to_position\: :ref:`int<class_int>` = -1\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_navigation_layer<class_TileSet_method_add_navigation_layer>`\ (\ to_position\: :ref:`int<class_int>` = -1\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_occlusion_layer<class_TileSet_method_add_occlusion_layer>`\ (\ to_position\: :ref:`int<class_int>` = -1\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`add_pattern<class_TileSet_method_add_pattern>`\ (\ pattern\: :ref:`TileMapPattern<class_TileMapPattern>`, index\: :ref:`int<class_int>` = -1\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_physics_layer<class_TileSet_method_add_physics_layer>`\ (\ to_position\: :ref:`int<class_int>` = -1\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`add_source<class_TileSet_method_add_source>`\ (\ source\: :ref:`TileSetSource<class_TileSetSource>`, atlas_source_id_override\: :ref:`int<class_int>` = -1\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_terrain<class_TileSet_method_add_terrain>`\ (\ terrain_set\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>` = -1\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_terrain_set<class_TileSet_method_add_terrain_set>`\ (\ to_position\: :ref:`int<class_int>` = -1\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`cleanup_invalid_tile_proxies<class_TileSet_method_cleanup_invalid_tile_proxies>`\ (\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`clear_tile_proxies<class_TileSet_method_clear_tile_proxies>`\ (\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>` | :ref:`get_alternative_level_tile_proxy<class_TileSet_method_get_alternative_level_tile_proxy>`\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`, alternative_from\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>` | :ref:`get_coords_level_tile_proxy<class_TileSet_method_get_coords_level_tile_proxy>`\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_custom_data_layer_by_name<class_TileSet_method_get_custom_data_layer_by_name>`\ (\ layer_name\: :ref:`String<class_String>`\ ) |const| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`get_custom_data_layer_name<class_TileSet_method_get_custom_data_layer_name>`\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` | :ref:`get_custom_data_layer_type<class_TileSet_method_get_custom_data_layer_type>`\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_custom_data_layers_count<class_TileSet_method_get_custom_data_layers_count>`\ (\ ) |const| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`get_navigation_layer_layer_value<class_TileSet_method_get_navigation_layer_layer_value>`\ (\ layer_index\: :ref:`int<class_int>`, layer_number\: :ref:`int<class_int>`\ ) |const| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_navigation_layer_layers<class_TileSet_method_get_navigation_layer_layers>`\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_navigation_layers_count<class_TileSet_method_get_navigation_layers_count>`\ (\ ) |const| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_next_source_id<class_TileSet_method_get_next_source_id>`\ (\ ) |const| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_occlusion_layer_light_mask<class_TileSet_method_get_occlusion_layer_light_mask>`\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`get_occlusion_layer_sdf_collision<class_TileSet_method_get_occlusion_layer_sdf_collision>`\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_occlusion_layers_count<class_TileSet_method_get_occlusion_layers_count>`\ (\ ) |const| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`TileMapPattern<class_TileMapPattern>` | :ref:`get_pattern<class_TileSet_method_get_pattern>`\ (\ index\: :ref:`int<class_int>` = -1\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_patterns_count<class_TileSet_method_get_patterns_count>`\ (\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_physics_layer_collision_layer<class_TileSet_method_get_physics_layer_collision_layer>`\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_physics_layer_collision_mask<class_TileSet_method_get_physics_layer_collision_mask>`\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_physics_layer_collision_priority<class_TileSet_method_get_physics_layer_collision_priority>`\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PhysicsMaterial<class_PhysicsMaterial>` | :ref:`get_physics_layer_physics_material<class_TileSet_method_get_physics_layer_physics_material>`\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_physics_layers_count<class_TileSet_method_get_physics_layers_count>`\ (\ ) |const| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`TileSetSource<class_TileSetSource>` | :ref:`get_source<class_TileSet_method_get_source>`\ (\ source_id\: :ref:`int<class_int>`\ ) |const| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_source_count<class_TileSet_method_get_source_count>`\ (\ ) |const| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_source_id<class_TileSet_method_get_source_id>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_source_level_tile_proxy<class_TileSet_method_get_source_level_tile_proxy>`\ (\ source_from\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Color<class_Color>` | :ref:`get_terrain_color<class_TileSet_method_get_terrain_color>`\ (\ terrain_set\: :ref:`int<class_int>`, terrain_index\: :ref:`int<class_int>`\ ) |const| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`get_terrain_name<class_TileSet_method_get_terrain_name>`\ (\ terrain_set\: :ref:`int<class_int>`, terrain_index\: :ref:`int<class_int>`\ ) |const| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`TerrainMode<enum_TileSet_TerrainMode>` | :ref:`get_terrain_set_mode<class_TileSet_method_get_terrain_set_mode>`\ (\ terrain_set\: :ref:`int<class_int>`\ ) |const| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_terrain_sets_count<class_TileSet_method_get_terrain_sets_count>`\ (\ ) |const| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_terrains_count<class_TileSet_method_get_terrains_count>`\ (\ terrain_set\: :ref:`int<class_int>`\ ) |const| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_alternative_level_tile_proxy<class_TileSet_method_has_alternative_level_tile_proxy>`\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`, alternative_from\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_coords_level_tile_proxy<class_TileSet_method_has_coords_level_tile_proxy>`\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_custom_data_layer_by_name<class_TileSet_method_has_custom_data_layer_by_name>`\ (\ layer_name\: :ref:`String<class_String>`\ ) |const| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_source<class_TileSet_method_has_source>`\ (\ source_id\: :ref:`int<class_int>`\ ) |const| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_source_level_tile_proxy<class_TileSet_method_has_source_level_tile_proxy>`\ (\ source_from\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>` | :ref:`map_tile_proxy<class_TileSet_method_map_tile_proxy>`\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`, alternative_from\: :ref:`int<class_int>`\ ) |const| |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`move_custom_data_layer<class_TileSet_method_move_custom_data_layer>`\ (\ layer_index\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`move_navigation_layer<class_TileSet_method_move_navigation_layer>`\ (\ layer_index\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`move_occlusion_layer<class_TileSet_method_move_occlusion_layer>`\ (\ layer_index\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`move_physics_layer<class_TileSet_method_move_physics_layer>`\ (\ layer_index\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`move_terrain<class_TileSet_method_move_terrain>`\ (\ terrain_set\: :ref:`int<class_int>`, terrain_index\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`move_terrain_set<class_TileSet_method_move_terrain_set>`\ (\ terrain_set\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`remove_alternative_level_tile_proxy<class_TileSet_method_remove_alternative_level_tile_proxy>`\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`, alternative_from\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`remove_coords_level_tile_proxy<class_TileSet_method_remove_coords_level_tile_proxy>`\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`remove_custom_data_layer<class_TileSet_method_remove_custom_data_layer>`\ (\ layer_index\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`remove_navigation_layer<class_TileSet_method_remove_navigation_layer>`\ (\ layer_index\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`remove_occlusion_layer<class_TileSet_method_remove_occlusion_layer>`\ (\ layer_index\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`remove_pattern<class_TileSet_method_remove_pattern>`\ (\ index\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`remove_physics_layer<class_TileSet_method_remove_physics_layer>`\ (\ layer_index\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`remove_source<class_TileSet_method_remove_source>`\ (\ source_id\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`remove_source_level_tile_proxy<class_TileSet_method_remove_source_level_tile_proxy>`\ (\ source_from\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`remove_terrain<class_TileSet_method_remove_terrain>`\ (\ terrain_set\: :ref:`int<class_int>`, terrain_index\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`remove_terrain_set<class_TileSet_method_remove_terrain_set>`\ (\ terrain_set\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_alternative_level_tile_proxy<class_TileSet_method_set_alternative_level_tile_proxy>`\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`, alternative_from\: :ref:`int<class_int>`, source_to\: :ref:`int<class_int>`, coords_to\: :ref:`Vector2i<class_Vector2i>`, alternative_to\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_coords_level_tile_proxy<class_TileSet_method_set_coords_level_tile_proxy>`\ (\ p_source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`, source_to\: :ref:`int<class_int>`, coords_to\: :ref:`Vector2i<class_Vector2i>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_custom_data_layer_name<class_TileSet_method_set_custom_data_layer_name>`\ (\ layer_index\: :ref:`int<class_int>`, layer_name\: :ref:`String<class_String>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_custom_data_layer_type<class_TileSet_method_set_custom_data_layer_type>`\ (\ layer_index\: :ref:`int<class_int>`, layer_type\: :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_navigation_layer_layer_value<class_TileSet_method_set_navigation_layer_layer_value>`\ (\ layer_index\: :ref:`int<class_int>`, layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_navigation_layer_layers<class_TileSet_method_set_navigation_layer_layers>`\ (\ layer_index\: :ref:`int<class_int>`, layers\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_occlusion_layer_light_mask<class_TileSet_method_set_occlusion_layer_light_mask>`\ (\ layer_index\: :ref:`int<class_int>`, light_mask\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_occlusion_layer_sdf_collision<class_TileSet_method_set_occlusion_layer_sdf_collision>`\ (\ layer_index\: :ref:`int<class_int>`, sdf_collision\: :ref:`bool<class_bool>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_physics_layer_collision_layer<class_TileSet_method_set_physics_layer_collision_layer>`\ (\ layer_index\: :ref:`int<class_int>`, layer\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_physics_layer_collision_mask<class_TileSet_method_set_physics_layer_collision_mask>`\ (\ layer_index\: :ref:`int<class_int>`, mask\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_physics_layer_collision_priority<class_TileSet_method_set_physics_layer_collision_priority>`\ (\ layer_index\: :ref:`int<class_int>`, priority\: :ref:`float<class_float>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_physics_layer_physics_material<class_TileSet_method_set_physics_layer_physics_material>`\ (\ layer_index\: :ref:`int<class_int>`, physics_material\: :ref:`PhysicsMaterial<class_PhysicsMaterial>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_source_id<class_TileSet_method_set_source_id>`\ (\ source_id\: :ref:`int<class_int>`, new_source_id\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_source_level_tile_proxy<class_TileSet_method_set_source_level_tile_proxy>`\ (\ source_from\: :ref:`int<class_int>`, source_to\: :ref:`int<class_int>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_terrain_color<class_TileSet_method_set_terrain_color>`\ (\ terrain_set\: :ref:`int<class_int>`, terrain_index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_terrain_name<class_TileSet_method_set_terrain_name>`\ (\ terrain_set\: :ref:`int<class_int>`, terrain_index\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_terrain_set_mode<class_TileSet_method_set_terrain_set_mode>`\ (\ terrain_set\: :ref:`int<class_int>`, mode\: :ref:`TerrainMode<enum_TileSet_TerrainMode>`\ ) |
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
列舉
----
.. _enum_TileSet_TileShape:
.. rst-class:: classref-enumeration
enum **TileShape**: :ref:`🔗<enum_TileSet_TileShape>`
.. _class_TileSet_constant_TILE_SHAPE_SQUARE:
.. rst-class:: classref-enumeration-constant
:ref:`TileShape<enum_TileSet_TileShape>` **TILE_SHAPE_SQUARE** = ``0``
矩形圖塊形狀。
.. _class_TileSet_constant_TILE_SHAPE_ISOMETRIC:
.. rst-class:: classref-enumeration-constant
:ref:`TileShape<enum_TileSet_TileShape>` **TILE_SHAPE_ISOMETRIC** = ``1``
Diamond tile shape (for isometric look).
\ **Note:** Isometric **TileSet** works best if all sibling :ref:`TileMapLayer<class_TileMapLayer>`\ s and their parent inheriting from :ref:`Node2D<class_Node2D>` have Y-sort enabled.
.. _class_TileSet_constant_TILE_SHAPE_HALF_OFFSET_SQUARE:
.. rst-class:: classref-enumeration-constant
:ref:`TileShape<enum_TileSet_TileShape>` **TILE_SHAPE_HALF_OFFSET_SQUARE** = ``2``
矩形圖塊形狀,每隔一行/列偏移半個圖塊。
.. _class_TileSet_constant_TILE_SHAPE_HEXAGON:
.. rst-class:: classref-enumeration-constant
:ref:`TileShape<enum_TileSet_TileShape>` **TILE_SHAPE_HEXAGON** = ``3``
六邊形圖塊形狀。
.. rst-class:: classref-item-separator
----
.. _enum_TileSet_TileLayout:
.. rst-class:: classref-enumeration
enum **TileLayout**: :ref:`🔗<enum_TileSet_TileLayout>`
.. _class_TileSet_constant_TILE_LAYOUT_STACKED:
.. rst-class:: classref-enumeration-constant
:ref:`TileLayout<enum_TileSet_TileLayout>` **TILE_LAYOUT_STACKED** = ``0``
圖塊座標佈局,兩個軸與對應的局部水平軸和垂直軸保持一致。
.. _class_TileSet_constant_TILE_LAYOUT_STACKED_OFFSET:
.. rst-class:: classref-enumeration-constant
:ref:`TileLayout<enum_TileSet_TileLayout>` **TILE_LAYOUT_STACKED_OFFSET** = ``1``
:ref:`TILE_LAYOUT_STACKED<class_TileSet_constant_TILE_LAYOUT_STACKED>` 相同,但第一個半偏移偏向負方向,而不是正方向。
.. _class_TileSet_constant_TILE_LAYOUT_STAIRS_RIGHT:
.. rst-class:: classref-enumeration-constant
:ref:`TileLayout<enum_TileSet_TileLayout>` **TILE_LAYOUT_STAIRS_RIGHT** = ``2``
圖塊座標佈局,水平軸保持水平,垂直軸朝向右下方。
.. _class_TileSet_constant_TILE_LAYOUT_STAIRS_DOWN:
.. rst-class:: classref-enumeration-constant
:ref:`TileLayout<enum_TileSet_TileLayout>` **TILE_LAYOUT_STAIRS_DOWN** = ``3``
圖塊座標佈局,垂直軸保持垂直,水平軸朝向右下方。
.. _class_TileSet_constant_TILE_LAYOUT_DIAMOND_RIGHT:
.. rst-class:: classref-enumeration-constant
:ref:`TileLayout<enum_TileSet_TileLayout>` **TILE_LAYOUT_DIAMOND_RIGHT** = ``4``
圖塊座標佈局,水平軸朝向右上方,垂直軸朝向右下方。
.. _class_TileSet_constant_TILE_LAYOUT_DIAMOND_DOWN:
.. rst-class:: classref-enumeration-constant
:ref:`TileLayout<enum_TileSet_TileLayout>` **TILE_LAYOUT_DIAMOND_DOWN** = ``5``
圖塊座標佈局,水平軸朝向右下方,垂直軸朝向左下方。
.. rst-class:: classref-item-separator
----
.. _enum_TileSet_TileOffsetAxis:
.. rst-class:: classref-enumeration
enum **TileOffsetAxis**: :ref:`🔗<enum_TileSet_TileOffsetAxis>`
.. _class_TileSet_constant_TILE_OFFSET_AXIS_HORIZONTAL:
.. rst-class:: classref-enumeration-constant
:ref:`TileOffsetAxis<enum_TileSet_TileOffsetAxis>` **TILE_OFFSET_AXIS_HORIZONTAL** = ``0``
水平半偏移。
.. _class_TileSet_constant_TILE_OFFSET_AXIS_VERTICAL:
.. rst-class:: classref-enumeration-constant
:ref:`TileOffsetAxis<enum_TileSet_TileOffsetAxis>` **TILE_OFFSET_AXIS_VERTICAL** = ``1``
垂直半偏移。
.. rst-class:: classref-item-separator
----
.. _enum_TileSet_CellNeighbor:
.. rst-class:: classref-enumeration
enum **CellNeighbor**: :ref:`🔗<enum_TileSet_CellNeighbor>`
.. _class_TileSet_constant_CELL_NEIGHBOR_RIGHT_SIDE:
.. rst-class:: classref-enumeration-constant
:ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_RIGHT_SIDE** = ``0``
右側相鄰儲存格。
.. _class_TileSet_constant_CELL_NEIGHBOR_RIGHT_CORNER:
.. rst-class:: classref-enumeration-constant
:ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_RIGHT_CORNER** = ``1``
右角相鄰儲存格。
.. _class_TileSet_constant_CELL_NEIGHBOR_BOTTOM_RIGHT_SIDE:
.. rst-class:: classref-enumeration-constant
:ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_BOTTOM_RIGHT_SIDE** = ``2``
右下側相鄰儲存格。
.. _class_TileSet_constant_CELL_NEIGHBOR_BOTTOM_RIGHT_CORNER:
.. rst-class:: classref-enumeration-constant
:ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_BOTTOM_RIGHT_CORNER** = ``3``
右下角相鄰儲存格。
.. _class_TileSet_constant_CELL_NEIGHBOR_BOTTOM_SIDE:
.. rst-class:: classref-enumeration-constant
:ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_BOTTOM_SIDE** = ``4``
下側相鄰儲存格。
.. _class_TileSet_constant_CELL_NEIGHBOR_BOTTOM_CORNER:
.. rst-class:: classref-enumeration-constant
:ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_BOTTOM_CORNER** = ``5``
下角相鄰儲存格。
.. _class_TileSet_constant_CELL_NEIGHBOR_BOTTOM_LEFT_SIDE:
.. rst-class:: classref-enumeration-constant
:ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_BOTTOM_LEFT_SIDE** = ``6``
左下側相鄰儲存格。
.. _class_TileSet_constant_CELL_NEIGHBOR_BOTTOM_LEFT_CORNER:
.. rst-class:: classref-enumeration-constant
:ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_BOTTOM_LEFT_CORNER** = ``7``
左下角相鄰儲存格。
.. _class_TileSet_constant_CELL_NEIGHBOR_LEFT_SIDE:
.. rst-class:: classref-enumeration-constant
:ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_LEFT_SIDE** = ``8``
左側相鄰儲存格。
.. _class_TileSet_constant_CELL_NEIGHBOR_LEFT_CORNER:
.. rst-class:: classref-enumeration-constant
:ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_LEFT_CORNER** = ``9``
左角相鄰儲存格。
.. _class_TileSet_constant_CELL_NEIGHBOR_TOP_LEFT_SIDE:
.. rst-class:: classref-enumeration-constant
:ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_TOP_LEFT_SIDE** = ``10``
左上側相鄰儲存格。
.. _class_TileSet_constant_CELL_NEIGHBOR_TOP_LEFT_CORNER:
.. rst-class:: classref-enumeration-constant
:ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_TOP_LEFT_CORNER** = ``11``
左上角相鄰儲存格。
.. _class_TileSet_constant_CELL_NEIGHBOR_TOP_SIDE:
.. rst-class:: classref-enumeration-constant
:ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_TOP_SIDE** = ``12``
上側相鄰儲存格。
.. _class_TileSet_constant_CELL_NEIGHBOR_TOP_CORNER:
.. rst-class:: classref-enumeration-constant
:ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_TOP_CORNER** = ``13``
上角相鄰儲存格。
.. _class_TileSet_constant_CELL_NEIGHBOR_TOP_RIGHT_SIDE:
.. rst-class:: classref-enumeration-constant
:ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_TOP_RIGHT_SIDE** = ``14``
右上側相鄰儲存格。
.. _class_TileSet_constant_CELL_NEIGHBOR_TOP_RIGHT_CORNER:
.. rst-class:: classref-enumeration-constant
:ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_TOP_RIGHT_CORNER** = ``15``
右上角相鄰儲存格。
.. rst-class:: classref-item-separator
----
.. _enum_TileSet_TerrainMode:
.. rst-class:: classref-enumeration
enum **TerrainMode**: :ref:`🔗<enum_TileSet_TerrainMode>`
.. _class_TileSet_constant_TERRAIN_MODE_MATCH_CORNERS_AND_SIDES:
.. rst-class:: classref-enumeration-constant
:ref:`TerrainMode<enum_TileSet_TerrainMode>` **TERRAIN_MODE_MATCH_CORNERS_AND_SIDES** = ``0``
要求與相鄰圖塊地形的角和邊都配對。
.. _class_TileSet_constant_TERRAIN_MODE_MATCH_CORNERS:
.. rst-class:: classref-enumeration-constant
:ref:`TerrainMode<enum_TileSet_TerrainMode>` **TERRAIN_MODE_MATCH_CORNERS** = ``1``
要求與相鄰圖塊地形的角相配對。
.. _class_TileSet_constant_TERRAIN_MODE_MATCH_SIDES:
.. rst-class:: classref-enumeration-constant
:ref:`TerrainMode<enum_TileSet_TerrainMode>` **TERRAIN_MODE_MATCH_SIDES** = ``2``
要求與相鄰圖塊地形的邊相配對。
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
屬性說明
--------
.. _class_TileSet_property_tile_layout:
.. rst-class:: classref-property
:ref:`TileLayout<enum_TileSet_TileLayout>` **tile_layout** = ``0`` :ref:`🔗<class_TileSet_property_tile_layout>`
.. rst-class:: classref-property-setget
- |void| **set_tile_layout**\ (\ value\: :ref:`TileLayout<enum_TileSet_TileLayout>`\ )
- :ref:`TileLayout<enum_TileSet_TileLayout>` **get_tile_layout**\ (\ )
For all half-offset shapes (Isometric, Hexagonal and Half-Offset square), changes the way tiles are indexed in the :ref:`TileMapLayer<class_TileMapLayer>` grid.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_property_tile_offset_axis:
.. rst-class:: classref-property
:ref:`TileOffsetAxis<enum_TileSet_TileOffsetAxis>` **tile_offset_axis** = ``0`` :ref:`🔗<class_TileSet_property_tile_offset_axis>`
.. rst-class:: classref-property-setget
- |void| **set_tile_offset_axis**\ (\ value\: :ref:`TileOffsetAxis<enum_TileSet_TileOffsetAxis>`\ )
- :ref:`TileOffsetAxis<enum_TileSet_TileOffsetAxis>` **get_tile_offset_axis**\ (\ )
對於所有半偏移形狀(等軸、六邊形和半偏移正方形),確定偏移軸。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_property_tile_shape:
.. rst-class:: classref-property
:ref:`TileShape<enum_TileSet_TileShape>` **tile_shape** = ``0`` :ref:`🔗<class_TileSet_property_tile_shape>`
.. rst-class:: classref-property-setget
- |void| **set_tile_shape**\ (\ value\: :ref:`TileShape<enum_TileSet_TileShape>`\ )
- :ref:`TileShape<enum_TileSet_TileShape>` **get_tile_shape**\ (\ )
圖塊的形狀。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_property_tile_size:
.. rst-class:: classref-property
:ref:`Vector2i<class_Vector2i>` **tile_size** = ``Vector2i(16, 16)`` :ref:`🔗<class_TileSet_property_tile_size>`
.. rst-class:: classref-property-setget
- |void| **set_tile_size**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ )
- :ref:`Vector2i<class_Vector2i>` **get_tile_size**\ (\ )
圖塊的大小,單位為圖元。無論圖塊是什麼形狀,這個大小對應的都是圖塊形狀的包圍矩形。因此,這是合集所需的最小儲存格大小。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_property_uv_clipping:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **uv_clipping** = ``false`` :ref:`🔗<class_TileSet_property_uv_clipping>`
.. rst-class:: classref-property-setget
- |void| **set_uv_clipping**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_uv_clipping**\ (\ )
算繪圖塊時啟用/禁用 UV 裁剪。
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
方法說明
--------
.. _class_TileSet_method_add_custom_data_layer:
.. rst-class:: classref-method
|void| **add_custom_data_layer**\ (\ to_position\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TileSet_method_add_custom_data_layer>`
在 TileSet 中新增自訂資料層,放置到陣列中的 ``to_position`` 位置。如果 ``to_position`` 為 -1則會將其新增到陣列的末尾。
自訂資料層能夠為合集圖塊分配自訂屬性。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_add_navigation_layer:
.. rst-class:: classref-method
|void| **add_navigation_layer**\ (\ to_position\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TileSet_method_add_navigation_layer>`
在 TileSet 中新增導覽層,放置到陣列中的 ``to_position`` 位置。如果 ``to_position`` 為 -1則會將其新增到陣列的末尾。
導覽層能夠為合集圖塊分配導覽區域。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_add_occlusion_layer:
.. rst-class:: classref-method
|void| **add_occlusion_layer**\ (\ to_position\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TileSet_method_add_occlusion_layer>`
在 TileSet 中新增遮擋層,放置到陣列中的 ``to_position`` 位置。如果 ``to_position`` 為 -1則會將其新增到陣列的末尾。
遮擋層能夠為合集圖塊分配遮擋多邊形。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_add_pattern:
.. rst-class:: classref-method
:ref:`int<class_int>` **add_pattern**\ (\ pattern\: :ref:`TileMapPattern<class_TileMapPattern>`, index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TileSet_method_add_pattern>`
新增儲存在 TileSet 資源中的 :ref:`TileMapPattern<class_TileMapPattern>`\ 。如果提供了 ``index``\ ,則會插入到給定的位置。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_add_physics_layer:
.. rst-class:: classref-method
|void| **add_physics_layer**\ (\ to_position\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TileSet_method_add_physics_layer>`
在 TileSet 中新增實體層,放置到陣列中的 ``to_position`` 位置。如果 ``to_position`` 為 -1則會將其新增到陣列的末尾。
實體層能夠為合集圖塊分配碰撞多邊形。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_add_source:
.. rst-class:: classref-method
:ref:`int<class_int>` **add_source**\ (\ source\: :ref:`TileSetSource<class_TileSetSource>`, atlas_source_id_override\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TileSet_method_add_source>`
在 TileSet 中新增 :ref:`TileSetSource<class_TileSetSource>`\ 。如果 ``atlas_source_id_override`` 不為 -1則還會設定其源 ID。否則會自動生成唯一識別碼。
函式返回新增的源 ID如果無法新增源則返回 -1。
\ **警告:**\ 同一個源不能同時屬於兩個 TileSet。如果新增的源已經附加到其他 **TileSet**\ ,則會在該那個 TileSet 中移除。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_add_terrain:
.. rst-class:: classref-method
|void| **add_terrain**\ (\ terrain_set\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TileSet_method_add_terrain>`
在 TileSet 的 ``terrain_set`` 地形集中新增新的地形,放置到陣列中的 ``to_position`` 位置。如果 ``to_position`` 為 -1則會將其新增到陣列的末尾。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_add_terrain_set:
.. rst-class:: classref-method
|void| **add_terrain_set**\ (\ to_position\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TileSet_method_add_terrain_set>`
在 TileSet 新增新的地形集,放置到陣列中的 ``to_position`` 位置。如果 ``to_position`` 為 -1則會將其新增到陣列的末尾。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_cleanup_invalid_tile_proxies:
.. rst-class:: classref-method
|void| **cleanup_invalid_tile_proxies**\ (\ ) :ref:`🔗<class_TileSet_method_cleanup_invalid_tile_proxies>`
清除指向無效圖塊的圖塊代理。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_clear_tile_proxies:
.. rst-class:: classref-method
|void| **clear_tile_proxies**\ (\ ) :ref:`🔗<class_TileSet_method_clear_tile_proxies>`
清除所有圖塊代理。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_alternative_level_tile_proxy:
.. rst-class:: classref-method
:ref:`Array<class_Array>` **get_alternative_level_tile_proxy**\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`, alternative_from\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_get_alternative_level_tile_proxy>`
返回給定識別字的備選級代理。返回的陣列包含三個代理的目標識別字(源 ID、合集坐標 ID 和備選圖塊 ID
如果該 TileSet 沒有給定識別字的代理,則返回空陣列。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_coords_level_tile_proxy:
.. rst-class:: classref-method
:ref:`Array<class_Array>` **get_coords_level_tile_proxy**\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_TileSet_method_get_coords_level_tile_proxy>`
返回給定識別字的座標級代理。返回的陣列包含代理的兩個目標識別字(源 ID 和合集座標 ID
如果該 TileSet 沒有給定識別字的代理,則返回空陣列。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_custom_data_layer_by_name:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_custom_data_layer_by_name**\ (\ layer_name\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TileSet_method_get_custom_data_layer_by_name>`
返回自訂資料層的索引,該自訂資料層由名稱表示。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_custom_data_layer_name:
.. rst-class:: classref-method
:ref:`String<class_String>` **get_custom_data_layer_name**\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_custom_data_layer_name>`
返回自訂資料層的名稱,該自訂資料層由索引表示。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_custom_data_layer_type:
.. rst-class:: classref-method
:ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **get_custom_data_layer_type**\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_custom_data_layer_type>`
返回自訂資料層的型別,該自訂資料層由索引表示。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_custom_data_layers_count:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_custom_data_layers_count**\ (\ ) |const| :ref:`🔗<class_TileSet_method_get_custom_data_layers_count>`
返回自訂資料層的數量。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_navigation_layer_layer_value:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **get_navigation_layer_layer_value**\ (\ layer_index\: :ref:`int<class_int>`, layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_navigation_layer_layer_value>`
返回由給定的 ``layer_index`` 標識的 TileSet 導覽資料層是否啟用了指定的導航層,導覽層 ``layer_number`` 在 1 和 32 之間。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_navigation_layer_layers:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_navigation_layer_layers**\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_navigation_layer_layers>`
返回給定 TileSet 導覽層的(導覽伺服器中的)導覽層。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_navigation_layers_count:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_navigation_layers_count**\ (\ ) |const| :ref:`🔗<class_TileSet_method_get_navigation_layers_count>`
返回導覽層的數量。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_next_source_id:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_next_source_id**\ (\ ) |const| :ref:`🔗<class_TileSet_method_get_next_source_id>`
Returns a new unused source ID. This generated ID is the same that a call to :ref:`add_source()<class_TileSet_method_add_source>` would return.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_occlusion_layer_light_mask:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_occlusion_layer_light_mask**\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_occlusion_layer_light_mask>`
返回遮擋層的光照遮罩。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_occlusion_layer_sdf_collision:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **get_occlusion_layer_sdf_collision**\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_occlusion_layer_sdf_collision>`
返回這個層的遮擋器是否使用 ``sdf_collision``\ 。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_occlusion_layers_count:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_occlusion_layers_count**\ (\ ) |const| :ref:`🔗<class_TileSet_method_get_occlusion_layers_count>`
返回遮擋層的數量。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_pattern:
.. rst-class:: classref-method
:ref:`TileMapPattern<class_TileMapPattern>` **get_pattern**\ (\ index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TileSet_method_get_pattern>`
返回給定 ``index`` 處的 :ref:`TileMapPattern<class_TileMapPattern>`\ 。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_patterns_count:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_patterns_count**\ (\ ) :ref:`🔗<class_TileSet_method_get_patterns_count>`
返回此圖塊集處理的 :ref:`TileMapPattern<class_TileMapPattern>` 的數量。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_physics_layer_collision_layer:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_physics_layer_collision_layer**\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_physics_layer_collision_layer>`
返回給定 TileSet 實體層中的物體所在的(物理伺服器中的)碰撞層。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_physics_layer_collision_mask:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_physics_layer_collision_mask**\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_physics_layer_collision_mask>`
返回給定 TileSet 實體層中物體的碰撞遮罩。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_physics_layer_collision_priority:
.. rst-class:: classref-method
:ref:`float<class_float>` **get_physics_layer_collision_priority**\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_physics_layer_collision_priority>`
Returns the collision priority of bodies on the given TileSet's physics layer.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_physics_layer_physics_material:
.. rst-class:: classref-method
:ref:`PhysicsMaterial<class_PhysicsMaterial>` **get_physics_layer_physics_material**\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_physics_layer_physics_material>`
返回給定 TileSet 實體層中物體的碰撞材質。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_physics_layers_count:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_physics_layers_count**\ (\ ) |const| :ref:`🔗<class_TileSet_method_get_physics_layers_count>`
返回實體層的數量。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_source:
.. rst-class:: classref-method
:ref:`TileSetSource<class_TileSetSource>` **get_source**\ (\ source_id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_source>`
返回 ID 為 ``source_id``:ref:`TileSetSource<class_TileSetSource>`\ 。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_source_count:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_source_count**\ (\ ) |const| :ref:`🔗<class_TileSet_method_get_source_count>`
返回該 TileSet 中 :ref:`TileSetSource<class_TileSetSource>` 的數量。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_source_id:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_source_id**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_source_id>`
返回索引為 ``index`` 的源的源 ID。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_source_level_tile_proxy:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_source_level_tile_proxy**\ (\ source_from\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_get_source_level_tile_proxy>`
返回給定源識別字的源級別代理。
如果 TileSet 沒有給定識別字的代理,則返回 -1。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_terrain_color:
.. rst-class:: classref-method
:ref:`Color<class_Color>` **get_terrain_color**\ (\ terrain_set\: :ref:`int<class_int>`, terrain_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_terrain_color>`
返回地形的顏色。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_terrain_name:
.. rst-class:: classref-method
:ref:`String<class_String>` **get_terrain_name**\ (\ terrain_set\: :ref:`int<class_int>`, terrain_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_terrain_name>`
返回地形的名稱。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_terrain_set_mode:
.. rst-class:: classref-method
:ref:`TerrainMode<enum_TileSet_TerrainMode>` **get_terrain_set_mode**\ (\ terrain_set\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_terrain_set_mode>`
返回地形集模式。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_terrain_sets_count:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_terrain_sets_count**\ (\ ) |const| :ref:`🔗<class_TileSet_method_get_terrain_sets_count>`
返回地形集的數量。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_terrains_count:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_terrains_count**\ (\ terrain_set\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_terrains_count>`
返回給定地形集中的地形數。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_has_alternative_level_tile_proxy:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_alternative_level_tile_proxy**\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`, alternative_from\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_has_alternative_level_tile_proxy>`
返回給定的識別字是否存在備選級別的代理。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_has_coords_level_tile_proxy:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_coords_level_tile_proxy**\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_TileSet_method_has_coords_level_tile_proxy>`
返回給定的識別字是否存在座標級別的代理。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_has_custom_data_layer_by_name:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_custom_data_layer_by_name**\ (\ layer_name\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TileSet_method_has_custom_data_layer_by_name>`
Returns if there is a custom data layer named ``layer_name``.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_has_source:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_source**\ (\ source_id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_has_source>`
返回該 TileSet 中是否存在給定源 ID 的源。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_has_source_level_tile_proxy:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_source_level_tile_proxy**\ (\ source_from\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_has_source_level_tile_proxy>`
返回給定的源 ID 是否存在源級別的代理。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_map_tile_proxy:
.. rst-class:: classref-method
:ref:`Array<class_Array>` **map_tile_proxy**\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`, alternative_from\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_map_tile_proxy>`
根據配置的代理,將提供的識別字對應到一組新的識別字。返回的是由源 ID、合集坐標 ID 和備選圖塊 ID 這三個元素構成的 Array。
這個函式首先搜尋配對的備選級代理,然後是座標級代理,然後是源級代理。
如果未找到與提供的識別字對應的代理,則返回與用作參數的值相同的值。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_move_custom_data_layer:
.. rst-class:: classref-method
|void| **move_custom_data_layer**\ (\ layer_index\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_move_custom_data_layer>`
將索引為 ``layer_index`` 的自訂資料層移動到陣列中給定的 ``to_position`` 位置。還會更新相應的合集圖塊。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_move_navigation_layer:
.. rst-class:: classref-method
|void| **move_navigation_layer**\ (\ layer_index\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_move_navigation_layer>`
將索引為 ``layer_index`` 的導覽層移動到陣列中給定的 ``to_position`` 位置。還會更新相應的合集圖塊。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_move_occlusion_layer:
.. rst-class:: classref-method
|void| **move_occlusion_layer**\ (\ layer_index\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_move_occlusion_layer>`
將索引為 ``layer_index`` 的遮擋層移動到陣列中給定的 ``to_position`` 位置。還會更新相應的合集圖塊。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_move_physics_layer:
.. rst-class:: classref-method
|void| **move_physics_layer**\ (\ layer_index\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_move_physics_layer>`
將索引為 ``layer_index`` 的實體層移動到陣列中給定的 ``to_position`` 位置。還會更新相應的合集圖塊。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_move_terrain:
.. rst-class:: classref-method
|void| **move_terrain**\ (\ terrain_set\: :ref:`int<class_int>`, terrain_index\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_move_terrain>`
將地形集 ``terrain_set`` 中索引為 ``terrain_index`` 的地形移動到陣列中給定的 ``to_position`` 位置。還會更新相應的合集圖塊。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_move_terrain_set:
.. rst-class:: classref-method
|void| **move_terrain_set**\ (\ terrain_set\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_move_terrain_set>`
將索引為 ``terrain_set`` 的地形集移動到陣列中給定的 ``to_position`` 位置。還會更新相應的合集圖塊。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_remove_alternative_level_tile_proxy:
.. rst-class:: classref-method
|void| **remove_alternative_level_tile_proxy**\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`, alternative_from\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_remove_alternative_level_tile_proxy>`
移除具有給定識別字的備選級別代理。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_remove_coords_level_tile_proxy:
.. rst-class:: classref-method
|void| **remove_coords_level_tile_proxy**\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_TileSet_method_remove_coords_level_tile_proxy>`
移除具有給定識別字的座標級別代理。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_remove_custom_data_layer:
.. rst-class:: classref-method
|void| **remove_custom_data_layer**\ (\ layer_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_remove_custom_data_layer>`
移除索引為 ``layer_index`` 的自訂資料層。也會相應地更新合集中的圖塊。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_remove_navigation_layer:
.. rst-class:: classref-method
|void| **remove_navigation_layer**\ (\ layer_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_remove_navigation_layer>`
移除索引為 ``layer_index`` 的導覽層。也會相應地更新合集中的圖塊。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_remove_occlusion_layer:
.. rst-class:: classref-method
|void| **remove_occlusion_layer**\ (\ layer_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_remove_occlusion_layer>`
移除索引為 ``layer_index`` 的遮擋層。也會相應地更新合集中的圖塊。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_remove_pattern:
.. rst-class:: classref-method
|void| **remove_pattern**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_remove_pattern>`
移除給定索引處的 :ref:`TileMapPattern<class_TileMapPattern>`\ 。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_remove_physics_layer:
.. rst-class:: classref-method
|void| **remove_physics_layer**\ (\ layer_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_remove_physics_layer>`
移除索引為 ``layer_index`` 的實體層。也會更新合集中的相應圖塊。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_remove_source:
.. rst-class:: classref-method
|void| **remove_source**\ (\ source_id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_remove_source>`
移除具有給定源 ID 的源。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_remove_source_level_tile_proxy:
.. rst-class:: classref-method
|void| **remove_source_level_tile_proxy**\ (\ source_from\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_remove_source_level_tile_proxy>`
移除源級別的圖塊代理。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_remove_terrain:
.. rst-class:: classref-method
|void| **remove_terrain**\ (\ terrain_set\: :ref:`int<class_int>`, terrain_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_remove_terrain>`
移除給定地形集 ``terrain_set`` 中索引為 ``terrain_index`` 的地形。也會相應地更新合集中的圖塊。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_remove_terrain_set:
.. rst-class:: classref-method
|void| **remove_terrain_set**\ (\ terrain_set\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_remove_terrain_set>`
移除索引為 ``terrain_set`` 的地形集。也會相應地更新合集中的圖塊。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_set_alternative_level_tile_proxy:
.. rst-class:: classref-method
|void| **set_alternative_level_tile_proxy**\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`, alternative_from\: :ref:`int<class_int>`, source_to\: :ref:`int<class_int>`, coords_to\: :ref:`Vector2i<class_Vector2i>`, alternative_to\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_set_alternative_level_tile_proxy>`
Create an alternative-level proxy for the given identifiers. A proxy will map set of tile identifiers to another set of identifiers.
Proxied tiles can be automatically replaced in TileMapLayer nodes using the editor.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_set_coords_level_tile_proxy:
.. rst-class:: classref-method
|void| **set_coords_level_tile_proxy**\ (\ p_source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`, source_to\: :ref:`int<class_int>`, coords_to\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_TileSet_method_set_coords_level_tile_proxy>`
Creates a coordinates-level proxy for the given identifiers. A proxy will map set of tile identifiers to another set of identifiers. The alternative tile ID is kept the same when using coordinates-level proxies.
Proxied tiles can be automatically replaced in TileMapLayer nodes using the editor.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_set_custom_data_layer_name:
.. rst-class:: classref-method
|void| **set_custom_data_layer_name**\ (\ layer_index\: :ref:`int<class_int>`, layer_name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TileSet_method_set_custom_data_layer_name>`
設定由給定索引標識的自訂資料層的名稱。名稱是層的識別字,因此如果名稱已被使用就會失敗並報告有錯。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_set_custom_data_layer_type:
.. rst-class:: classref-method
|void| **set_custom_data_layer_type**\ (\ layer_index\: :ref:`int<class_int>`, layer_type\: :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>`\ ) :ref:`🔗<class_TileSet_method_set_custom_data_layer_type>`
設定自訂資料層的型別,該自訂資料層由索引表示。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_set_navigation_layer_layer_value:
.. rst-class:: classref-method
|void| **set_navigation_layer_layer_value**\ (\ layer_index\: :ref:`int<class_int>`, layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TileSet_method_set_navigation_layer_layer_value>`
根據 ``value``\ ,啟用或禁用 TileSet 導覽資料層中指定的導覽層,導覽資料層由給定的 ``layer_index`` 標識,給定的 ``layer_number`` 應在 1 和 32 之間。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_set_navigation_layer_layers:
.. rst-class:: classref-method
|void| **set_navigation_layer_layers**\ (\ layer_index\: :ref:`int<class_int>`, layers\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_set_navigation_layer_layers>`
設定給定 TileSet 導覽層中導覽區域的導覽層(導覽伺服器中使用)。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_set_occlusion_layer_light_mask:
.. rst-class:: classref-method
|void| **set_occlusion_layer_light_mask**\ (\ layer_index\: :ref:`int<class_int>`, light_mask\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_set_occlusion_layer_light_mask>`
設定給定 TileSet 遮擋層中遮擋器的遮擋層(算繪伺服器中使用)。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_set_occlusion_layer_sdf_collision:
.. rst-class:: classref-method
|void| **set_occlusion_layer_sdf_collision**\ (\ layer_index\: :ref:`int<class_int>`, sdf_collision\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TileSet_method_set_occlusion_layer_sdf_collision>`
啟用或禁用給定 TileSet 遮擋層中遮擋器的 SDF 碰撞。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_set_physics_layer_collision_layer:
.. rst-class:: classref-method
|void| **set_physics_layer_collision_layer**\ (\ layer_index\: :ref:`int<class_int>`, layer\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_set_physics_layer_collision_layer>`
Sets the collision layer (as in the physics server) for bodies in the given TileSet physics layer.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_set_physics_layer_collision_mask:
.. rst-class:: classref-method
|void| **set_physics_layer_collision_mask**\ (\ layer_index\: :ref:`int<class_int>`, mask\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_set_physics_layer_collision_mask>`
Sets the collision mask for bodies in the given TileSet physics layer.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_set_physics_layer_collision_priority:
.. rst-class:: classref-method
|void| **set_physics_layer_collision_priority**\ (\ layer_index\: :ref:`int<class_int>`, priority\: :ref:`float<class_float>`\ ) :ref:`🔗<class_TileSet_method_set_physics_layer_collision_priority>`
Sets the collision priority for bodies in the given TileSet physics layer.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_set_physics_layer_physics_material:
.. rst-class:: classref-method
|void| **set_physics_layer_physics_material**\ (\ layer_index\: :ref:`int<class_int>`, physics_material\: :ref:`PhysicsMaterial<class_PhysicsMaterial>`\ ) :ref:`🔗<class_TileSet_method_set_physics_layer_physics_material>`
設定給定 TileSet 實體層中物體的物理材質。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_set_source_id:
.. rst-class:: classref-method
|void| **set_source_id**\ (\ source_id\: :ref:`int<class_int>`, new_source_id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_set_source_id>`
更改源的 ID。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_set_source_level_tile_proxy:
.. rst-class:: classref-method
|void| **set_source_level_tile_proxy**\ (\ source_from\: :ref:`int<class_int>`, source_to\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_set_source_level_tile_proxy>`
Creates a source-level proxy for the given source ID. A proxy will map set of tile identifiers to another set of identifiers. Both the atlas coordinates ID and the alternative tile ID are kept the same when using source-level proxies.
Proxied tiles can be automatically replaced in TileMapLayer nodes using the editor.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_set_terrain_color:
.. rst-class:: classref-method
|void| **set_terrain_color**\ (\ terrain_set\: :ref:`int<class_int>`, terrain_index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_TileSet_method_set_terrain_color>`
設定地形的顏色。該顏色用於在 TileSet 編輯器中區分不同的地形。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_set_terrain_name:
.. rst-class:: classref-method
|void| **set_terrain_name**\ (\ terrain_set\: :ref:`int<class_int>`, terrain_index\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TileSet_method_set_terrain_name>`
設定地形的名稱。
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_set_terrain_set_mode:
.. rst-class:: classref-method
|void| **set_terrain_set_mode**\ (\ terrain_set\: :ref:`int<class_int>`, mode\: :ref:`TerrainMode<enum_TileSet_TerrainMode>`\ ) :ref:`🔗<class_TileSet_method_set_terrain_set_mode>`
設定地形模式。每種模式決定了圖塊形狀的哪一個位被用來配對相鄰圖塊的地形。
.. |virtual| replace:: :abbr:`virtual (本方法通常需要使用者覆寫才能生效。)`
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
.. |const| replace:: :abbr:`const (本方法沒有副作用。不會修改該實例的任何成員變數。)`
.. |vararg| replace:: :abbr:`vararg (本方法除了這裡描述的參數外,還可以接受任意數量的參數。)`
.. |constructor| replace:: :abbr:`constructor (本方法用於建構一個型別。)`
.. |static| replace:: :abbr:`static (本方法無需實例即可呼叫,因此可以直接使用類別名稱呼叫。)`
.. |operator| replace:: :abbr:`operator (本方法描述將本型別作為左運算元時可用的有效運算子。)`
.. |bitfield| replace:: :abbr:`BitField (此值是由下列旗標組成的位元遮罩整數。)`
.. |void| replace:: :abbr:`void (無回傳值。)`