class_tiledata.rst 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/TileData.xml.
  6. .. _class_TileData:
  7. TileData
  8. ========
  9. **Inherits:** :ref:`Object<class_Object>`
  10. Properties
  11. ----------
  12. +---------------------------------+---------------------------------------------------------------+-----------------------+
  13. | :ref:`bool<class_bool>` | :ref:`flip_h<class_TileData_property_flip_h>` | ``false`` |
  14. +---------------------------------+---------------------------------------------------------------+-----------------------+
  15. | :ref:`bool<class_bool>` | :ref:`flip_v<class_TileData_property_flip_v>` | ``false`` |
  16. +---------------------------------+---------------------------------------------------------------+-----------------------+
  17. | :ref:`Material<class_Material>` | :ref:`material<class_TileData_property_material>` | |
  18. +---------------------------------+---------------------------------------------------------------+-----------------------+
  19. | :ref:`Color<class_Color>` | :ref:`modulate<class_TileData_property_modulate>` | ``Color(1, 1, 1, 1)`` |
  20. +---------------------------------+---------------------------------------------------------------+-----------------------+
  21. | :ref:`float<class_float>` | :ref:`probability<class_TileData_property_probability>` | ``1.0`` |
  22. +---------------------------------+---------------------------------------------------------------+-----------------------+
  23. | :ref:`int<class_int>` | :ref:`terrain<class_TileData_property_terrain>` | ``-1`` |
  24. +---------------------------------+---------------------------------------------------------------+-----------------------+
  25. | :ref:`int<class_int>` | :ref:`terrain_set<class_TileData_property_terrain_set>` | ``-1`` |
  26. +---------------------------------+---------------------------------------------------------------+-----------------------+
  27. | :ref:`Vector2i<class_Vector2i>` | :ref:`texture_offset<class_TileData_property_texture_offset>` | ``Vector2i(0, 0)`` |
  28. +---------------------------------+---------------------------------------------------------------+-----------------------+
  29. | :ref:`bool<class_bool>` | :ref:`transpose<class_TileData_property_transpose>` | ``false`` |
  30. +---------------------------------+---------------------------------------------------------------+-----------------------+
  31. | :ref:`int<class_int>` | :ref:`y_sort_origin<class_TileData_property_y_sort_origin>` | ``0`` |
  32. +---------------------------------+---------------------------------------------------------------+-----------------------+
  33. | :ref:`int<class_int>` | :ref:`z_index<class_TileData_property_z_index>` | ``0`` |
  34. +---------------------------------+---------------------------------------------------------------+-----------------------+
  35. Methods
  36. -------
  37. +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | void | :ref:`add_collision_polygon<class_TileData_method_add_collision_polygon>` **(** :ref:`int<class_int>` layer_id **)** |
  39. +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | :ref:`float<class_float>` | :ref:`get_collision_polygon_one_way_margin<class_TileData_method_get_collision_polygon_one_way_margin>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index **)** |const| |
  41. +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`get_collision_polygon_points<class_TileData_method_get_collision_polygon_points>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index **)** |const| |
  43. +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | :ref:`int<class_int>` | :ref:`get_collision_polygons_count<class_TileData_method_get_collision_polygons_count>` **(** :ref:`int<class_int>` layer_id **)** |const| |
  45. +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | :ref:`float<class_float>` | :ref:`get_constant_angular_velocity<class_TileData_method_get_constant_angular_velocity>` **(** :ref:`int<class_int>` layer_id **)** |const| |
  47. +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :ref:`Vector2<class_Vector2>` | :ref:`get_constant_linear_velocity<class_TileData_method_get_constant_linear_velocity>` **(** :ref:`int<class_int>` layer_id **)** |const| |
  49. +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | :ref:`Variant<class_Variant>` | :ref:`get_custom_data<class_TileData_method_get_custom_data>` **(** :ref:`String<class_String>` layer_name **)** |const| |
  51. +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | :ref:`Variant<class_Variant>` | :ref:`get_custom_data_by_layer_id<class_TileData_method_get_custom_data_by_layer_id>` **(** :ref:`int<class_int>` layer_id **)** |const| |
  53. +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | :ref:`NavigationPolygon<class_NavigationPolygon>` | :ref:`get_navigation_polygon<class_TileData_method_get_navigation_polygon>` **(** :ref:`int<class_int>` layer_id **)** |const| |
  55. +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` | :ref:`get_occluder<class_TileData_method_get_occluder>` **(** :ref:`int<class_int>` layer_id **)** |const| |
  57. +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`int<class_int>` | :ref:`get_terrain_peering_bit<class_TileData_method_get_terrain_peering_bit>` **(** :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` peering_bit **)** |const| |
  59. +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`bool<class_bool>` | :ref:`is_collision_polygon_one_way<class_TileData_method_is_collision_polygon_one_way>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index **)** |const| |
  61. +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | void | :ref:`remove_collision_polygon<class_TileData_method_remove_collision_polygon>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index **)** |
  63. +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | void | :ref:`set_collision_polygon_one_way<class_TileData_method_set_collision_polygon_one_way>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index, :ref:`bool<class_bool>` one_way **)** |
  65. +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | void | :ref:`set_collision_polygon_one_way_margin<class_TileData_method_set_collision_polygon_one_way_margin>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index, :ref:`float<class_float>` one_way_margin **)** |
  67. +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | void | :ref:`set_collision_polygon_points<class_TileData_method_set_collision_polygon_points>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index, :ref:`PackedVector2Array<class_PackedVector2Array>` polygon **)** |
  69. +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | void | :ref:`set_collision_polygons_count<class_TileData_method_set_collision_polygons_count>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygons_count **)** |
  71. +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | void | :ref:`set_constant_angular_velocity<class_TileData_method_set_constant_angular_velocity>` **(** :ref:`int<class_int>` layer_id, :ref:`float<class_float>` velocity **)** |
  73. +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | void | :ref:`set_constant_linear_velocity<class_TileData_method_set_constant_linear_velocity>` **(** :ref:`int<class_int>` layer_id, :ref:`Vector2<class_Vector2>` velocity **)** |
  75. +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | void | :ref:`set_custom_data<class_TileData_method_set_custom_data>` **(** :ref:`String<class_String>` layer_name, :ref:`Variant<class_Variant>` value **)** |
  77. +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | void | :ref:`set_custom_data_by_layer_id<class_TileData_method_set_custom_data_by_layer_id>` **(** :ref:`int<class_int>` layer_id, :ref:`Variant<class_Variant>` value **)** |
  79. +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | void | :ref:`set_navigation_polygon<class_TileData_method_set_navigation_polygon>` **(** :ref:`int<class_int>` layer_id, :ref:`NavigationPolygon<class_NavigationPolygon>` navigation_polygon **)** |
  81. +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | void | :ref:`set_occluder<class_TileData_method_set_occluder>` **(** :ref:`int<class_int>` layer_id, :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` occluder_polygon **)** |
  83. +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | void | :ref:`set_terrain_peering_bit<class_TileData_method_set_terrain_peering_bit>` **(** :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` peering_bit, :ref:`int<class_int>` terrain **)** |
  85. +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. Signals
  87. -------
  88. .. _class_TileData_signal_changed:
  89. - **changed** **(** **)**
  90. Property Descriptions
  91. ---------------------
  92. .. _class_TileData_property_flip_h:
  93. - :ref:`bool<class_bool>` **flip_h**
  94. +-----------+-------------------+
  95. | *Default* | ``false`` |
  96. +-----------+-------------------+
  97. | *Setter* | set_flip_h(value) |
  98. +-----------+-------------------+
  99. | *Getter* | get_flip_h() |
  100. +-----------+-------------------+
  101. ----
  102. .. _class_TileData_property_flip_v:
  103. - :ref:`bool<class_bool>` **flip_v**
  104. +-----------+-------------------+
  105. | *Default* | ``false`` |
  106. +-----------+-------------------+
  107. | *Setter* | set_flip_v(value) |
  108. +-----------+-------------------+
  109. | *Getter* | get_flip_v() |
  110. +-----------+-------------------+
  111. ----
  112. .. _class_TileData_property_material:
  113. - :ref:`Material<class_Material>` **material**
  114. +----------+---------------------+
  115. | *Setter* | set_material(value) |
  116. +----------+---------------------+
  117. | *Getter* | get_material() |
  118. +----------+---------------------+
  119. The :ref:`Material<class_Material>` to use for this ``TileData``. This can be a :ref:`CanvasItemMaterial<class_CanvasItemMaterial>` to use the default shader, or a :ref:`ShaderMaterial<class_ShaderMaterial>` to use a custom shader.
  120. ----
  121. .. _class_TileData_property_modulate:
  122. - :ref:`Color<class_Color>` **modulate**
  123. +-----------+-----------------------+
  124. | *Default* | ``Color(1, 1, 1, 1)`` |
  125. +-----------+-----------------------+
  126. | *Setter* | set_modulate(value) |
  127. +-----------+-----------------------+
  128. | *Getter* | get_modulate() |
  129. +-----------+-----------------------+
  130. ----
  131. .. _class_TileData_property_probability:
  132. - :ref:`float<class_float>` **probability**
  133. +-----------+------------------------+
  134. | *Default* | ``1.0`` |
  135. +-----------+------------------------+
  136. | *Setter* | set_probability(value) |
  137. +-----------+------------------------+
  138. | *Getter* | get_probability() |
  139. +-----------+------------------------+
  140. ----
  141. .. _class_TileData_property_terrain:
  142. - :ref:`int<class_int>` **terrain**
  143. +-----------+--------------------+
  144. | *Default* | ``-1`` |
  145. +-----------+--------------------+
  146. | *Setter* | set_terrain(value) |
  147. +-----------+--------------------+
  148. | *Getter* | get_terrain() |
  149. +-----------+--------------------+
  150. ----
  151. .. _class_TileData_property_terrain_set:
  152. - :ref:`int<class_int>` **terrain_set**
  153. +-----------+------------------------+
  154. | *Default* | ``-1`` |
  155. +-----------+------------------------+
  156. | *Setter* | set_terrain_set(value) |
  157. +-----------+------------------------+
  158. | *Getter* | get_terrain_set() |
  159. +-----------+------------------------+
  160. ----
  161. .. _class_TileData_property_texture_offset:
  162. - :ref:`Vector2i<class_Vector2i>` **texture_offset**
  163. +-----------+---------------------------+
  164. | *Default* | ``Vector2i(0, 0)`` |
  165. +-----------+---------------------------+
  166. | *Setter* | set_texture_offset(value) |
  167. +-----------+---------------------------+
  168. | *Getter* | get_texture_offset() |
  169. +-----------+---------------------------+
  170. ----
  171. .. _class_TileData_property_transpose:
  172. - :ref:`bool<class_bool>` **transpose**
  173. +-----------+----------------------+
  174. | *Default* | ``false`` |
  175. +-----------+----------------------+
  176. | *Setter* | set_transpose(value) |
  177. +-----------+----------------------+
  178. | *Getter* | get_transpose() |
  179. +-----------+----------------------+
  180. ----
  181. .. _class_TileData_property_y_sort_origin:
  182. - :ref:`int<class_int>` **y_sort_origin**
  183. +-----------+--------------------------+
  184. | *Default* | ``0`` |
  185. +-----------+--------------------------+
  186. | *Setter* | set_y_sort_origin(value) |
  187. +-----------+--------------------------+
  188. | *Getter* | get_y_sort_origin() |
  189. +-----------+--------------------------+
  190. ----
  191. .. _class_TileData_property_z_index:
  192. - :ref:`int<class_int>` **z_index**
  193. +-----------+--------------------+
  194. | *Default* | ``0`` |
  195. +-----------+--------------------+
  196. | *Setter* | set_z_index(value) |
  197. +-----------+--------------------+
  198. | *Getter* | get_z_index() |
  199. +-----------+--------------------+
  200. Method Descriptions
  201. -------------------
  202. .. _class_TileData_method_add_collision_polygon:
  203. - void **add_collision_polygon** **(** :ref:`int<class_int>` layer_id **)**
  204. Adds a collision polygon to the tile on the given TileSet physics layer.
  205. ----
  206. .. _class_TileData_method_get_collision_polygon_one_way_margin:
  207. - :ref:`float<class_float>` **get_collision_polygon_one_way_margin** **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index **)** |const|
  208. Returns the one-way margin (for one-way platforms) of the polygon at index ``polygon_index`` for TileSet physics layer with index ``layer_id``.
  209. ----
  210. .. _class_TileData_method_get_collision_polygon_points:
  211. - :ref:`PackedVector2Array<class_PackedVector2Array>` **get_collision_polygon_points** **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index **)** |const|
  212. Returns the points of the polygon at index ``polygon_index`` for TileSet physics layer with index ``layer_id``.
  213. ----
  214. .. _class_TileData_method_get_collision_polygons_count:
  215. - :ref:`int<class_int>` **get_collision_polygons_count** **(** :ref:`int<class_int>` layer_id **)** |const|
  216. Returns how many polygons the tile has for TileSet physics layer with index ``layer_id``.
  217. ----
  218. .. _class_TileData_method_get_constant_angular_velocity:
  219. - :ref:`float<class_float>` **get_constant_angular_velocity** **(** :ref:`int<class_int>` layer_id **)** |const|
  220. Returns the constant angular velocity applied to objects colliding with this tile.
  221. ----
  222. .. _class_TileData_method_get_constant_linear_velocity:
  223. - :ref:`Vector2<class_Vector2>` **get_constant_linear_velocity** **(** :ref:`int<class_int>` layer_id **)** |const|
  224. Returns the constant linear velocity applied to objects colliding with this tile.
  225. ----
  226. .. _class_TileData_method_get_custom_data:
  227. - :ref:`Variant<class_Variant>` **get_custom_data** **(** :ref:`String<class_String>` layer_name **)** |const|
  228. Returns the custom data value for custom data layer named ``layer_name``.
  229. ----
  230. .. _class_TileData_method_get_custom_data_by_layer_id:
  231. - :ref:`Variant<class_Variant>` **get_custom_data_by_layer_id** **(** :ref:`int<class_int>` layer_id **)** |const|
  232. Returns the custom data value for custom data layer with index ``layer_id``.
  233. ----
  234. .. _class_TileData_method_get_navigation_polygon:
  235. - :ref:`NavigationPolygon<class_NavigationPolygon>` **get_navigation_polygon** **(** :ref:`int<class_int>` layer_id **)** |const|
  236. Returns the navigation polygon of the tile for the TileSet navigation layer with index ``layer_id``.
  237. ----
  238. .. _class_TileData_method_get_occluder:
  239. - :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` **get_occluder** **(** :ref:`int<class_int>` layer_id **)** |const|
  240. Returns the occluder polygon of the tile for the TileSet occlusion layer with index ``layer_id``.
  241. ----
  242. .. _class_TileData_method_get_terrain_peering_bit:
  243. - :ref:`int<class_int>` **get_terrain_peering_bit** **(** :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` peering_bit **)** |const|
  244. Returns the tile's terrain bit for the given ``peering_bit`` direction.
  245. ----
  246. .. _class_TileData_method_is_collision_polygon_one_way:
  247. - :ref:`bool<class_bool>` **is_collision_polygon_one_way** **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index **)** |const|
  248. Returns whether one-way collisions are enabled for the polygon at index ``polygon_index`` for TileSet physics layer with index ``layer_id``.
  249. ----
  250. .. _class_TileData_method_remove_collision_polygon:
  251. - void **remove_collision_polygon** **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index **)**
  252. Removes the polygon at index ``polygon_index`` for TileSet physics layer with index ``layer_id``.
  253. ----
  254. .. _class_TileData_method_set_collision_polygon_one_way:
  255. - void **set_collision_polygon_one_way** **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index, :ref:`bool<class_bool>` one_way **)**
  256. Enables/disables one-way collisions on the polygon at index ``polygon_index`` for TileSet physics layer with index ``layer_id``.
  257. ----
  258. .. _class_TileData_method_set_collision_polygon_one_way_margin:
  259. - void **set_collision_polygon_one_way_margin** **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index, :ref:`float<class_float>` one_way_margin **)**
  260. Enables/disables one-way collisions on the polygon at index ``polygon_index`` for TileSet physics layer with index ``layer_id``.
  261. ----
  262. .. _class_TileData_method_set_collision_polygon_points:
  263. - void **set_collision_polygon_points** **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index, :ref:`PackedVector2Array<class_PackedVector2Array>` polygon **)**
  264. Sets the points of the polygon at index ``polygon_index`` for TileSet physics layer with index ``layer_id``.
  265. ----
  266. .. _class_TileData_method_set_collision_polygons_count:
  267. - void **set_collision_polygons_count** **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygons_count **)**
  268. Sets the polygons count for TileSet physics layer with index ``layer_id``.
  269. ----
  270. .. _class_TileData_method_set_constant_angular_velocity:
  271. - void **set_constant_angular_velocity** **(** :ref:`int<class_int>` layer_id, :ref:`float<class_float>` velocity **)**
  272. Sets the constant angular velocity. This does not rotate the tile. This angular velocity is applied to objects colliding with this tile.
  273. ----
  274. .. _class_TileData_method_set_constant_linear_velocity:
  275. - void **set_constant_linear_velocity** **(** :ref:`int<class_int>` layer_id, :ref:`Vector2<class_Vector2>` velocity **)**
  276. Sets the constant linear velocity. This does not move the tile. This linear velocity is applied to objects colliding with this tile. This is useful to create conveyor belts.
  277. ----
  278. .. _class_TileData_method_set_custom_data:
  279. - void **set_custom_data** **(** :ref:`String<class_String>` layer_name, :ref:`Variant<class_Variant>` value **)**
  280. Sets the tile's custom data value for the TileSet custom data layer with name ``layer_name``.
  281. ----
  282. .. _class_TileData_method_set_custom_data_by_layer_id:
  283. - void **set_custom_data_by_layer_id** **(** :ref:`int<class_int>` layer_id, :ref:`Variant<class_Variant>` value **)**
  284. Sets the tile's custom data value for the TileSet custom data layer with index ``layer_id``.
  285. ----
  286. .. _class_TileData_method_set_navigation_polygon:
  287. - void **set_navigation_polygon** **(** :ref:`int<class_int>` layer_id, :ref:`NavigationPolygon<class_NavigationPolygon>` navigation_polygon **)**
  288. Sets the navigation polygon for the TileSet navigation layer with index ``layer_id``.
  289. ----
  290. .. _class_TileData_method_set_occluder:
  291. - void **set_occluder** **(** :ref:`int<class_int>` layer_id, :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` occluder_polygon **)**
  292. Sets the occluder for the TileSet occlusion layer with index ``layer_id``.
  293. ----
  294. .. _class_TileData_method_set_terrain_peering_bit:
  295. - void **set_terrain_peering_bit** **(** :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` peering_bit, :ref:`int<class_int>` terrain **)**
  296. Sets the tile's terrain bit for the given ``peering_bit`` direction.
  297. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  298. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  299. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  300. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  301. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  302. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`