class_tileset.rst 64 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the TileSet.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_TileSet:
  6. TileSet
  7. =======
  8. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. Tile library for tilemaps.
  10. Description
  11. -----------
  12. A TileSet is a library of tiles for a :ref:`TileMap<class_TileMap>`. It contains a list of tiles, each consisting of a sprite and optional collision shapes.
  13. Tiles are referenced by a unique integer ID.
  14. Methods
  15. -------
  16. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`Vector2<class_Vector2>` | :ref:`_forward_atlas_subtile_selection<class_TileSet_method__forward_atlas_subtile_selection>` **(** :ref:`int<class_int>` atlastile_id, :ref:`Object<class_Object>` tilemap, :ref:`Vector2<class_Vector2>` tile_location **)** virtual |
  18. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`Vector2<class_Vector2>` | :ref:`_forward_subtile_selection<class_TileSet_method__forward_subtile_selection>` **(** :ref:`int<class_int>` autotile_id, :ref:`int<class_int>` bitmask, :ref:`Object<class_Object>` tilemap, :ref:`Vector2<class_Vector2>` tile_location **)** virtual |
  20. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`bool<class_bool>` | :ref:`_is_tile_bound<class_TileSet_method__is_tile_bound>` **(** :ref:`int<class_int>` drawn_id, :ref:`int<class_int>` neighbor_id **)** virtual |
  22. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | void | :ref:`autotile_clear_bitmask_map<class_TileSet_method_autotile_clear_bitmask_map>` **(** :ref:`int<class_int>` id **)** |
  24. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`int<class_int>` | :ref:`autotile_get_bitmask<class_TileSet_method_autotile_get_bitmask>` **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord **)** |
  26. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`BitmaskMode<enum_TileSet_BitmaskMode>` | :ref:`autotile_get_bitmask_mode<class_TileSet_method_autotile_get_bitmask_mode>` **(** :ref:`int<class_int>` id **)** const |
  28. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`Vector2<class_Vector2>` | :ref:`autotile_get_icon_coordinate<class_TileSet_method_autotile_get_icon_coordinate>` **(** :ref:`int<class_int>` id **)** const |
  30. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` | :ref:`autotile_get_light_occluder<class_TileSet_method_autotile_get_light_occluder>` **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord **)** const |
  32. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`NavigationPolygon<class_NavigationPolygon>` | :ref:`autotile_get_navigation_polygon<class_TileSet_method_autotile_get_navigation_polygon>` **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord **)** const |
  34. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`Vector2<class_Vector2>` | :ref:`autotile_get_size<class_TileSet_method_autotile_get_size>` **(** :ref:`int<class_int>` id **)** const |
  36. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`int<class_int>` | :ref:`autotile_get_spacing<class_TileSet_method_autotile_get_spacing>` **(** :ref:`int<class_int>` id **)** const |
  38. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`int<class_int>` | :ref:`autotile_get_subtile_priority<class_TileSet_method_autotile_get_subtile_priority>` **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord **)** |
  40. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`int<class_int>` | :ref:`autotile_get_z_index<class_TileSet_method_autotile_get_z_index>` **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord **)** |
  42. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | void | :ref:`autotile_set_bitmask<class_TileSet_method_autotile_set_bitmask>` **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` bitmask, :ref:`int<class_int>` flag **)** |
  44. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | void | :ref:`autotile_set_bitmask_mode<class_TileSet_method_autotile_set_bitmask_mode>` **(** :ref:`int<class_int>` id, :ref:`BitmaskMode<enum_TileSet_BitmaskMode>` mode **)** |
  46. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | void | :ref:`autotile_set_icon_coordinate<class_TileSet_method_autotile_set_icon_coordinate>` **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord **)** |
  48. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. | void | :ref:`autotile_set_light_occluder<class_TileSet_method_autotile_set_light_occluder>` **(** :ref:`int<class_int>` id, :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` light_occluder, :ref:`Vector2<class_Vector2>` coord **)** |
  50. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | void | :ref:`autotile_set_navigation_polygon<class_TileSet_method_autotile_set_navigation_polygon>` **(** :ref:`int<class_int>` id, :ref:`NavigationPolygon<class_NavigationPolygon>` navigation_polygon, :ref:`Vector2<class_Vector2>` coord **)** |
  52. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | void | :ref:`autotile_set_size<class_TileSet_method_autotile_set_size>` **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` size **)** |
  54. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  55. | void | :ref:`autotile_set_spacing<class_TileSet_method_autotile_set_spacing>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` spacing **)** |
  56. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  57. | void | :ref:`autotile_set_subtile_priority<class_TileSet_method_autotile_set_subtile_priority>` **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord, :ref:`int<class_int>` priority **)** |
  58. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  59. | void | :ref:`autotile_set_z_index<class_TileSet_method_autotile_set_z_index>` **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord, :ref:`int<class_int>` z_index **)** |
  60. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  61. | void | :ref:`clear<class_TileSet_method_clear>` **(** **)** |
  62. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  63. | void | :ref:`create_tile<class_TileSet_method_create_tile>` **(** :ref:`int<class_int>` id **)** |
  64. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  65. | :ref:`int<class_int>` | :ref:`find_tile_by_name<class_TileSet_method_find_tile_by_name>` **(** :ref:`String<class_String>` name **)** const |
  66. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | :ref:`int<class_int>` | :ref:`get_last_unused_tile_id<class_TileSet_method_get_last_unused_tile_id>` **(** **)** const |
  68. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | :ref:`Array<class_Array>` | :ref:`get_tiles_ids<class_TileSet_method_get_tiles_ids>` **(** **)** const |
  70. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | void | :ref:`remove_tile<class_TileSet_method_remove_tile>` **(** :ref:`int<class_int>` id **)** |
  72. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  73. | void | :ref:`tile_add_shape<class_TileSet_method_tile_add_shape>` **(** :ref:`int<class_int>` id, :ref:`Shape2D<class_Shape2D>` shape, :ref:`Transform2D<class_Transform2D>` shape_transform, :ref:`bool<class_bool>` one_way=false, :ref:`Vector2<class_Vector2>` autotile_coord=Vector2( 0, 0 ) **)** |
  74. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  75. | :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` | :ref:`tile_get_light_occluder<class_TileSet_method_tile_get_light_occluder>` **(** :ref:`int<class_int>` id **)** const |
  76. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  77. | :ref:`ShaderMaterial<class_ShaderMaterial>` | :ref:`tile_get_material<class_TileSet_method_tile_get_material>` **(** :ref:`int<class_int>` id **)** const |
  78. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  79. | :ref:`Color<class_Color>` | :ref:`tile_get_modulate<class_TileSet_method_tile_get_modulate>` **(** :ref:`int<class_int>` id **)** const |
  80. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  81. | :ref:`String<class_String>` | :ref:`tile_get_name<class_TileSet_method_tile_get_name>` **(** :ref:`int<class_int>` id **)** const |
  82. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  83. | :ref:`NavigationPolygon<class_NavigationPolygon>` | :ref:`tile_get_navigation_polygon<class_TileSet_method_tile_get_navigation_polygon>` **(** :ref:`int<class_int>` id **)** const |
  84. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  85. | :ref:`Vector2<class_Vector2>` | :ref:`tile_get_navigation_polygon_offset<class_TileSet_method_tile_get_navigation_polygon_offset>` **(** :ref:`int<class_int>` id **)** const |
  86. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  87. | :ref:`Texture2D<class_Texture2D>` | :ref:`tile_get_normal_map<class_TileSet_method_tile_get_normal_map>` **(** :ref:`int<class_int>` id **)** const |
  88. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  89. | :ref:`Vector2<class_Vector2>` | :ref:`tile_get_occluder_offset<class_TileSet_method_tile_get_occluder_offset>` **(** :ref:`int<class_int>` id **)** const |
  90. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  91. | :ref:`Rect2<class_Rect2>` | :ref:`tile_get_region<class_TileSet_method_tile_get_region>` **(** :ref:`int<class_int>` id **)** const |
  92. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  93. | :ref:`Shape2D<class_Shape2D>` | :ref:`tile_get_shape<class_TileSet_method_tile_get_shape>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id **)** const |
  94. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  95. | :ref:`int<class_int>` | :ref:`tile_get_shape_count<class_TileSet_method_tile_get_shape_count>` **(** :ref:`int<class_int>` id **)** const |
  96. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  97. | :ref:`Vector2<class_Vector2>` | :ref:`tile_get_shape_offset<class_TileSet_method_tile_get_shape_offset>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id **)** const |
  98. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  99. | :ref:`bool<class_bool>` | :ref:`tile_get_shape_one_way<class_TileSet_method_tile_get_shape_one_way>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id **)** const |
  100. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  101. | :ref:`float<class_float>` | :ref:`tile_get_shape_one_way_margin<class_TileSet_method_tile_get_shape_one_way_margin>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id **)** const |
  102. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  103. | :ref:`Transform2D<class_Transform2D>` | :ref:`tile_get_shape_transform<class_TileSet_method_tile_get_shape_transform>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id **)** const |
  104. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  105. | :ref:`Array<class_Array>` | :ref:`tile_get_shapes<class_TileSet_method_tile_get_shapes>` **(** :ref:`int<class_int>` id **)** const |
  106. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  107. | :ref:`Texture2D<class_Texture2D>` | :ref:`tile_get_texture<class_TileSet_method_tile_get_texture>` **(** :ref:`int<class_int>` id **)** const |
  108. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  109. | :ref:`Vector2<class_Vector2>` | :ref:`tile_get_texture_offset<class_TileSet_method_tile_get_texture_offset>` **(** :ref:`int<class_int>` id **)** const |
  110. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  111. | :ref:`TileMode<enum_TileSet_TileMode>` | :ref:`tile_get_tile_mode<class_TileSet_method_tile_get_tile_mode>` **(** :ref:`int<class_int>` id **)** const |
  112. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  113. | :ref:`int<class_int>` | :ref:`tile_get_z_index<class_TileSet_method_tile_get_z_index>` **(** :ref:`int<class_int>` id **)** const |
  114. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  115. | void | :ref:`tile_set_light_occluder<class_TileSet_method_tile_set_light_occluder>` **(** :ref:`int<class_int>` id, :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` light_occluder **)** |
  116. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  117. | void | :ref:`tile_set_material<class_TileSet_method_tile_set_material>` **(** :ref:`int<class_int>` id, :ref:`ShaderMaterial<class_ShaderMaterial>` material **)** |
  118. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  119. | void | :ref:`tile_set_modulate<class_TileSet_method_tile_set_modulate>` **(** :ref:`int<class_int>` id, :ref:`Color<class_Color>` color **)** |
  120. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  121. | void | :ref:`tile_set_name<class_TileSet_method_tile_set_name>` **(** :ref:`int<class_int>` id, :ref:`String<class_String>` name **)** |
  122. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  123. | void | :ref:`tile_set_navigation_polygon<class_TileSet_method_tile_set_navigation_polygon>` **(** :ref:`int<class_int>` id, :ref:`NavigationPolygon<class_NavigationPolygon>` navigation_polygon **)** |
  124. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  125. | void | :ref:`tile_set_navigation_polygon_offset<class_TileSet_method_tile_set_navigation_polygon_offset>` **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` navigation_polygon_offset **)** |
  126. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  127. | void | :ref:`tile_set_normal_map<class_TileSet_method_tile_set_normal_map>` **(** :ref:`int<class_int>` id, :ref:`Texture2D<class_Texture2D>` normal_map **)** |
  128. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  129. | void | :ref:`tile_set_occluder_offset<class_TileSet_method_tile_set_occluder_offset>` **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` occluder_offset **)** |
  130. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  131. | void | :ref:`tile_set_region<class_TileSet_method_tile_set_region>` **(** :ref:`int<class_int>` id, :ref:`Rect2<class_Rect2>` region **)** |
  132. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  133. | void | :ref:`tile_set_shape<class_TileSet_method_tile_set_shape>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id, :ref:`Shape2D<class_Shape2D>` shape **)** |
  134. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  135. | void | :ref:`tile_set_shape_offset<class_TileSet_method_tile_set_shape_offset>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id, :ref:`Vector2<class_Vector2>` shape_offset **)** |
  136. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  137. | void | :ref:`tile_set_shape_one_way<class_TileSet_method_tile_set_shape_one_way>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id, :ref:`bool<class_bool>` one_way **)** |
  138. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  139. | void | :ref:`tile_set_shape_one_way_margin<class_TileSet_method_tile_set_shape_one_way_margin>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id, :ref:`float<class_float>` one_way **)** |
  140. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  141. | void | :ref:`tile_set_shape_transform<class_TileSet_method_tile_set_shape_transform>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id, :ref:`Transform2D<class_Transform2D>` shape_transform **)** |
  142. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  143. | void | :ref:`tile_set_shapes<class_TileSet_method_tile_set_shapes>` **(** :ref:`int<class_int>` id, :ref:`Array<class_Array>` shapes **)** |
  144. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  145. | void | :ref:`tile_set_texture<class_TileSet_method_tile_set_texture>` **(** :ref:`int<class_int>` id, :ref:`Texture2D<class_Texture2D>` texture **)** |
  146. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  147. | void | :ref:`tile_set_texture_offset<class_TileSet_method_tile_set_texture_offset>` **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` texture_offset **)** |
  148. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  149. | void | :ref:`tile_set_tile_mode<class_TileSet_method_tile_set_tile_mode>` **(** :ref:`int<class_int>` id, :ref:`TileMode<enum_TileSet_TileMode>` tilemode **)** |
  150. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  151. | void | :ref:`tile_set_z_index<class_TileSet_method_tile_set_z_index>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` z_index **)** |
  152. +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  153. Enumerations
  154. ------------
  155. .. _enum_TileSet_BitmaskMode:
  156. .. _class_TileSet_constant_BITMASK_2X2:
  157. .. _class_TileSet_constant_BITMASK_3X3_MINIMAL:
  158. .. _class_TileSet_constant_BITMASK_3X3:
  159. enum **BitmaskMode**:
  160. - **BITMASK_2X2** = **0**
  161. - **BITMASK_3X3_MINIMAL** = **1**
  162. - **BITMASK_3X3** = **2**
  163. ----
  164. .. _enum_TileSet_AutotileBindings:
  165. .. _class_TileSet_constant_BIND_TOPLEFT:
  166. .. _class_TileSet_constant_BIND_TOP:
  167. .. _class_TileSet_constant_BIND_TOPRIGHT:
  168. .. _class_TileSet_constant_BIND_LEFT:
  169. .. _class_TileSet_constant_BIND_CENTER:
  170. .. _class_TileSet_constant_BIND_RIGHT:
  171. .. _class_TileSet_constant_BIND_BOTTOMLEFT:
  172. .. _class_TileSet_constant_BIND_BOTTOM:
  173. .. _class_TileSet_constant_BIND_BOTTOMRIGHT:
  174. enum **AutotileBindings**:
  175. - **BIND_TOPLEFT** = **1**
  176. - **BIND_TOP** = **2**
  177. - **BIND_TOPRIGHT** = **4**
  178. - **BIND_LEFT** = **8**
  179. - **BIND_CENTER** = **16**
  180. - **BIND_RIGHT** = **32**
  181. - **BIND_BOTTOMLEFT** = **64**
  182. - **BIND_BOTTOM** = **128**
  183. - **BIND_BOTTOMRIGHT** = **256**
  184. ----
  185. .. _enum_TileSet_TileMode:
  186. .. _class_TileSet_constant_SINGLE_TILE:
  187. .. _class_TileSet_constant_AUTO_TILE:
  188. .. _class_TileSet_constant_ATLAS_TILE:
  189. enum **TileMode**:
  190. - **SINGLE_TILE** = **0**
  191. - **AUTO_TILE** = **1**
  192. - **ATLAS_TILE** = **2**
  193. Method Descriptions
  194. -------------------
  195. .. _class_TileSet_method__forward_atlas_subtile_selection:
  196. - :ref:`Vector2<class_Vector2>` **_forward_atlas_subtile_selection** **(** :ref:`int<class_int>` atlastile_id, :ref:`Object<class_Object>` tilemap, :ref:`Vector2<class_Vector2>` tile_location **)** virtual
  197. ----
  198. .. _class_TileSet_method__forward_subtile_selection:
  199. - :ref:`Vector2<class_Vector2>` **_forward_subtile_selection** **(** :ref:`int<class_int>` autotile_id, :ref:`int<class_int>` bitmask, :ref:`Object<class_Object>` tilemap, :ref:`Vector2<class_Vector2>` tile_location **)** virtual
  200. ----
  201. .. _class_TileSet_method__is_tile_bound:
  202. - :ref:`bool<class_bool>` **_is_tile_bound** **(** :ref:`int<class_int>` drawn_id, :ref:`int<class_int>` neighbor_id **)** virtual
  203. ----
  204. .. _class_TileSet_method_autotile_clear_bitmask_map:
  205. - void **autotile_clear_bitmask_map** **(** :ref:`int<class_int>` id **)**
  206. Clears all bitmask information of the autotile.
  207. ----
  208. .. _class_TileSet_method_autotile_get_bitmask:
  209. - :ref:`int<class_int>` **autotile_get_bitmask** **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord **)**
  210. Returns the bitmask of the subtile from an autotile given its coordinates.
  211. The value is the sum of the values in :ref:`AutotileBindings<enum_TileSet_AutotileBindings>` present in the subtile (e.g. a value of 5 means the bitmask has bindings in both the top left and top right).
  212. ----
  213. .. _class_TileSet_method_autotile_get_bitmask_mode:
  214. - :ref:`BitmaskMode<enum_TileSet_BitmaskMode>` **autotile_get_bitmask_mode** **(** :ref:`int<class_int>` id **)** const
  215. Returns the :ref:`BitmaskMode<enum_TileSet_BitmaskMode>` of the autotile.
  216. ----
  217. .. _class_TileSet_method_autotile_get_icon_coordinate:
  218. - :ref:`Vector2<class_Vector2>` **autotile_get_icon_coordinate** **(** :ref:`int<class_int>` id **)** const
  219. Returns the subtile that's being used as an icon in an atlas/autotile given its coordinates.
  220. The subtile defined as the icon will be used as a fallback when the atlas/autotile's bitmask information is incomplete. It will also be used to represent it in the TileSet editor.
  221. ----
  222. .. _class_TileSet_method_autotile_get_light_occluder:
  223. - :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` **autotile_get_light_occluder** **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord **)** const
  224. Returns the light occluder of the subtile from an atlas/autotile given its coordinates.
  225. ----
  226. .. _class_TileSet_method_autotile_get_navigation_polygon:
  227. - :ref:`NavigationPolygon<class_NavigationPolygon>` **autotile_get_navigation_polygon** **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord **)** const
  228. Returns the navigation polygon of the subtile from an atlas/autotile given its coordinates.
  229. ----
  230. .. _class_TileSet_method_autotile_get_size:
  231. - :ref:`Vector2<class_Vector2>` **autotile_get_size** **(** :ref:`int<class_int>` id **)** const
  232. Returns the size of the subtiles in an atlas/autotile.
  233. ----
  234. .. _class_TileSet_method_autotile_get_spacing:
  235. - :ref:`int<class_int>` **autotile_get_spacing** **(** :ref:`int<class_int>` id **)** const
  236. Returns the spacing between subtiles of the atlas/autotile.
  237. ----
  238. .. _class_TileSet_method_autotile_get_subtile_priority:
  239. - :ref:`int<class_int>` **autotile_get_subtile_priority** **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord **)**
  240. Returns the priority of the subtile from an autotile given its coordinates.
  241. When more than one subtile has the same bitmask value, one of them will be picked randomly for drawing. Its priority will define how often it will be picked.
  242. ----
  243. .. _class_TileSet_method_autotile_get_z_index:
  244. - :ref:`int<class_int>` **autotile_get_z_index** **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord **)**
  245. Returns the drawing index of the subtile from an atlas/autotile given its coordinates.
  246. ----
  247. .. _class_TileSet_method_autotile_set_bitmask:
  248. - void **autotile_set_bitmask** **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` bitmask, :ref:`int<class_int>` flag **)**
  249. Sets the bitmask of the subtile from an autotile given its coordinates.
  250. The value is the sum of the values in :ref:`AutotileBindings<enum_TileSet_AutotileBindings>` present in the subtile (e.g. a value of 5 means the bitmask has bindings in both the top left and top right).
  251. ----
  252. .. _class_TileSet_method_autotile_set_bitmask_mode:
  253. - void **autotile_set_bitmask_mode** **(** :ref:`int<class_int>` id, :ref:`BitmaskMode<enum_TileSet_BitmaskMode>` mode **)**
  254. Sets the :ref:`BitmaskMode<enum_TileSet_BitmaskMode>` of the autotile.
  255. ----
  256. .. _class_TileSet_method_autotile_set_icon_coordinate:
  257. - void **autotile_set_icon_coordinate** **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord **)**
  258. Sets the subtile that will be used as an icon in an atlas/autotile given its coordinates.
  259. The subtile defined as the icon will be used as a fallback when the atlas/autotile's bitmask information is incomplete. It will also be used to represent it in the TileSet editor.
  260. ----
  261. .. _class_TileSet_method_autotile_set_light_occluder:
  262. - void **autotile_set_light_occluder** **(** :ref:`int<class_int>` id, :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` light_occluder, :ref:`Vector2<class_Vector2>` coord **)**
  263. Sets the light occluder of the subtile from an atlas/autotile given its coordinates.
  264. ----
  265. .. _class_TileSet_method_autotile_set_navigation_polygon:
  266. - void **autotile_set_navigation_polygon** **(** :ref:`int<class_int>` id, :ref:`NavigationPolygon<class_NavigationPolygon>` navigation_polygon, :ref:`Vector2<class_Vector2>` coord **)**
  267. Sets the navigation polygon of the subtile from an atlas/autotile given its coordinates.
  268. ----
  269. .. _class_TileSet_method_autotile_set_size:
  270. - void **autotile_set_size** **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` size **)**
  271. Sets the size of the subtiles in an atlas/autotile.
  272. ----
  273. .. _class_TileSet_method_autotile_set_spacing:
  274. - void **autotile_set_spacing** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` spacing **)**
  275. Sets the spacing between subtiles of the atlas/autotile.
  276. ----
  277. .. _class_TileSet_method_autotile_set_subtile_priority:
  278. - void **autotile_set_subtile_priority** **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord, :ref:`int<class_int>` priority **)**
  279. Sets the priority of the subtile from an autotile given its coordinates.
  280. When more than one subtile has the same bitmask value, one of them will be picked randomly for drawing. Its priority will define how often it will be picked.
  281. ----
  282. .. _class_TileSet_method_autotile_set_z_index:
  283. - void **autotile_set_z_index** **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord, :ref:`int<class_int>` z_index **)**
  284. Sets the drawing index of the subtile from an atlas/autotile given its coordinates.
  285. ----
  286. .. _class_TileSet_method_clear:
  287. - void **clear** **(** **)**
  288. Clears all tiles.
  289. ----
  290. .. _class_TileSet_method_create_tile:
  291. - void **create_tile** **(** :ref:`int<class_int>` id **)**
  292. Creates a new tile with the given ID.
  293. ----
  294. .. _class_TileSet_method_find_tile_by_name:
  295. - :ref:`int<class_int>` **find_tile_by_name** **(** :ref:`String<class_String>` name **)** const
  296. Returns the first tile matching the given name.
  297. ----
  298. .. _class_TileSet_method_get_last_unused_tile_id:
  299. - :ref:`int<class_int>` **get_last_unused_tile_id** **(** **)** const
  300. Returns the ID following the last currently used ID, useful when creating a new tile.
  301. ----
  302. .. _class_TileSet_method_get_tiles_ids:
  303. - :ref:`Array<class_Array>` **get_tiles_ids** **(** **)** const
  304. Returns an array of all currently used tile IDs.
  305. ----
  306. .. _class_TileSet_method_remove_tile:
  307. - void **remove_tile** **(** :ref:`int<class_int>` id **)**
  308. Removes the given tile ID.
  309. ----
  310. .. _class_TileSet_method_tile_add_shape:
  311. - void **tile_add_shape** **(** :ref:`int<class_int>` id, :ref:`Shape2D<class_Shape2D>` shape, :ref:`Transform2D<class_Transform2D>` shape_transform, :ref:`bool<class_bool>` one_way=false, :ref:`Vector2<class_Vector2>` autotile_coord=Vector2( 0, 0 ) **)**
  312. Adds a shape to the tile.
  313. ----
  314. .. _class_TileSet_method_tile_get_light_occluder:
  315. - :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` **tile_get_light_occluder** **(** :ref:`int<class_int>` id **)** const
  316. Returns the tile's light occluder.
  317. ----
  318. .. _class_TileSet_method_tile_get_material:
  319. - :ref:`ShaderMaterial<class_ShaderMaterial>` **tile_get_material** **(** :ref:`int<class_int>` id **)** const
  320. Returns the tile's material.
  321. ----
  322. .. _class_TileSet_method_tile_get_modulate:
  323. - :ref:`Color<class_Color>` **tile_get_modulate** **(** :ref:`int<class_int>` id **)** const
  324. Returns the tile's modulation color.
  325. ----
  326. .. _class_TileSet_method_tile_get_name:
  327. - :ref:`String<class_String>` **tile_get_name** **(** :ref:`int<class_int>` id **)** const
  328. Returns the tile's name.
  329. ----
  330. .. _class_TileSet_method_tile_get_navigation_polygon:
  331. - :ref:`NavigationPolygon<class_NavigationPolygon>` **tile_get_navigation_polygon** **(** :ref:`int<class_int>` id **)** const
  332. Returns the navigation polygon of the tile.
  333. ----
  334. .. _class_TileSet_method_tile_get_navigation_polygon_offset:
  335. - :ref:`Vector2<class_Vector2>` **tile_get_navigation_polygon_offset** **(** :ref:`int<class_int>` id **)** const
  336. Returns the offset of the tile's navigation polygon.
  337. ----
  338. .. _class_TileSet_method_tile_get_normal_map:
  339. - :ref:`Texture2D<class_Texture2D>` **tile_get_normal_map** **(** :ref:`int<class_int>` id **)** const
  340. Returns the tile's normal map texture.
  341. ----
  342. .. _class_TileSet_method_tile_get_occluder_offset:
  343. - :ref:`Vector2<class_Vector2>` **tile_get_occluder_offset** **(** :ref:`int<class_int>` id **)** const
  344. Returns the offset of the tile's light occluder.
  345. ----
  346. .. _class_TileSet_method_tile_get_region:
  347. - :ref:`Rect2<class_Rect2>` **tile_get_region** **(** :ref:`int<class_int>` id **)** const
  348. Returns the tile sub-region in the texture.
  349. ----
  350. .. _class_TileSet_method_tile_get_shape:
  351. - :ref:`Shape2D<class_Shape2D>` **tile_get_shape** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id **)** const
  352. Returns a tile's given shape.
  353. ----
  354. .. _class_TileSet_method_tile_get_shape_count:
  355. - :ref:`int<class_int>` **tile_get_shape_count** **(** :ref:`int<class_int>` id **)** const
  356. Returns the number of shapes assigned to a tile.
  357. ----
  358. .. _class_TileSet_method_tile_get_shape_offset:
  359. - :ref:`Vector2<class_Vector2>` **tile_get_shape_offset** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id **)** const
  360. Returns the offset of a tile's shape.
  361. ----
  362. .. _class_TileSet_method_tile_get_shape_one_way:
  363. - :ref:`bool<class_bool>` **tile_get_shape_one_way** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id **)** const
  364. Returns the one-way collision value of a tile's shape.
  365. ----
  366. .. _class_TileSet_method_tile_get_shape_one_way_margin:
  367. - :ref:`float<class_float>` **tile_get_shape_one_way_margin** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id **)** const
  368. ----
  369. .. _class_TileSet_method_tile_get_shape_transform:
  370. - :ref:`Transform2D<class_Transform2D>` **tile_get_shape_transform** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id **)** const
  371. Returns the :ref:`Transform2D<class_Transform2D>` of a tile's shape.
  372. ----
  373. .. _class_TileSet_method_tile_get_shapes:
  374. - :ref:`Array<class_Array>` **tile_get_shapes** **(** :ref:`int<class_int>` id **)** const
  375. Returns an array of the tile's shapes.
  376. ----
  377. .. _class_TileSet_method_tile_get_texture:
  378. - :ref:`Texture2D<class_Texture2D>` **tile_get_texture** **(** :ref:`int<class_int>` id **)** const
  379. Returns the tile's texture.
  380. ----
  381. .. _class_TileSet_method_tile_get_texture_offset:
  382. - :ref:`Vector2<class_Vector2>` **tile_get_texture_offset** **(** :ref:`int<class_int>` id **)** const
  383. Returns the texture offset of the tile.
  384. ----
  385. .. _class_TileSet_method_tile_get_tile_mode:
  386. - :ref:`TileMode<enum_TileSet_TileMode>` **tile_get_tile_mode** **(** :ref:`int<class_int>` id **)** const
  387. Returns the tile's :ref:`TileMode<enum_TileSet_TileMode>`.
  388. ----
  389. .. _class_TileSet_method_tile_get_z_index:
  390. - :ref:`int<class_int>` **tile_get_z_index** **(** :ref:`int<class_int>` id **)** const
  391. Returns the tile's Z index (drawing layer).
  392. ----
  393. .. _class_TileSet_method_tile_set_light_occluder:
  394. - void **tile_set_light_occluder** **(** :ref:`int<class_int>` id, :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` light_occluder **)**
  395. Sets a light occluder for the tile.
  396. ----
  397. .. _class_TileSet_method_tile_set_material:
  398. - void **tile_set_material** **(** :ref:`int<class_int>` id, :ref:`ShaderMaterial<class_ShaderMaterial>` material **)**
  399. Sets the tile's material.
  400. ----
  401. .. _class_TileSet_method_tile_set_modulate:
  402. - void **tile_set_modulate** **(** :ref:`int<class_int>` id, :ref:`Color<class_Color>` color **)**
  403. Sets the tile's modulation color.
  404. ----
  405. .. _class_TileSet_method_tile_set_name:
  406. - void **tile_set_name** **(** :ref:`int<class_int>` id, :ref:`String<class_String>` name **)**
  407. Sets the tile's name.
  408. ----
  409. .. _class_TileSet_method_tile_set_navigation_polygon:
  410. - void **tile_set_navigation_polygon** **(** :ref:`int<class_int>` id, :ref:`NavigationPolygon<class_NavigationPolygon>` navigation_polygon **)**
  411. Sets the tile's navigation polygon.
  412. ----
  413. .. _class_TileSet_method_tile_set_navigation_polygon_offset:
  414. - void **tile_set_navigation_polygon_offset** **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` navigation_polygon_offset **)**
  415. Sets an offset for the tile's navigation polygon.
  416. ----
  417. .. _class_TileSet_method_tile_set_normal_map:
  418. - void **tile_set_normal_map** **(** :ref:`int<class_int>` id, :ref:`Texture2D<class_Texture2D>` normal_map **)**
  419. Sets the tile's normal map texture.
  420. ----
  421. .. _class_TileSet_method_tile_set_occluder_offset:
  422. - void **tile_set_occluder_offset** **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` occluder_offset **)**
  423. Sets an offset for the tile's light occluder.
  424. ----
  425. .. _class_TileSet_method_tile_set_region:
  426. - void **tile_set_region** **(** :ref:`int<class_int>` id, :ref:`Rect2<class_Rect2>` region **)**
  427. Sets the tile's sub-region in the texture. This is common in texture atlases.
  428. ----
  429. .. _class_TileSet_method_tile_set_shape:
  430. - void **tile_set_shape** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id, :ref:`Shape2D<class_Shape2D>` shape **)**
  431. Sets a shape for the tile, enabling collision.
  432. ----
  433. .. _class_TileSet_method_tile_set_shape_offset:
  434. - void **tile_set_shape_offset** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id, :ref:`Vector2<class_Vector2>` shape_offset **)**
  435. Sets the offset of a tile's shape.
  436. ----
  437. .. _class_TileSet_method_tile_set_shape_one_way:
  438. - void **tile_set_shape_one_way** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id, :ref:`bool<class_bool>` one_way **)**
  439. Enables one-way collision on a tile's shape.
  440. ----
  441. .. _class_TileSet_method_tile_set_shape_one_way_margin:
  442. - void **tile_set_shape_one_way_margin** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id, :ref:`float<class_float>` one_way **)**
  443. ----
  444. .. _class_TileSet_method_tile_set_shape_transform:
  445. - void **tile_set_shape_transform** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id, :ref:`Transform2D<class_Transform2D>` shape_transform **)**
  446. Sets a :ref:`Transform2D<class_Transform2D>` on a tile's shape.
  447. ----
  448. .. _class_TileSet_method_tile_set_shapes:
  449. - void **tile_set_shapes** **(** :ref:`int<class_int>` id, :ref:`Array<class_Array>` shapes **)**
  450. Sets an array of shapes for the tile, enabling collision.
  451. ----
  452. .. _class_TileSet_method_tile_set_texture:
  453. - void **tile_set_texture** **(** :ref:`int<class_int>` id, :ref:`Texture2D<class_Texture2D>` texture **)**
  454. Sets the tile's texture.
  455. ----
  456. .. _class_TileSet_method_tile_set_texture_offset:
  457. - void **tile_set_texture_offset** **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` texture_offset **)**
  458. Sets the tile's texture offset.
  459. ----
  460. .. _class_TileSet_method_tile_set_tile_mode:
  461. - void **tile_set_tile_mode** **(** :ref:`int<class_int>` id, :ref:`TileMode<enum_TileSet_TileMode>` tilemode **)**
  462. Sets the tile's :ref:`TileMode<enum_TileSet_TileMode>`.
  463. ----
  464. .. _class_TileSet_method_tile_set_z_index:
  465. - void **tile_set_z_index** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` z_index **)**
  466. Sets the tile's drawing index.