TileData.xml 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="TileData" inherits="Object" version="4.0">
  3. <brief_description>
  4. </brief_description>
  5. <description>
  6. </description>
  7. <tutorials>
  8. </tutorials>
  9. <methods>
  10. <method name="add_collision_polygon">
  11. <return type="void" />
  12. <argument index="0" name="layer_id" type="int" />
  13. <description>
  14. Adds a collision polygon to the tile on the given TileSet physics layer.
  15. </description>
  16. </method>
  17. <method name="get_collision_polygon_one_way_margin" qualifiers="const">
  18. <return type="float" />
  19. <argument index="0" name="layer_id" type="int" />
  20. <argument index="1" name="polygon_index" type="int" />
  21. <description>
  22. Returns the one-way margin (for one-way platforms) of the polygon at index [code]polygon_index[/code] for TileSet physics layer with index [code]layer_id[/code].
  23. </description>
  24. </method>
  25. <method name="get_collision_polygon_points" qualifiers="const">
  26. <return type="PackedVector2Array" />
  27. <argument index="0" name="layer_id" type="int" />
  28. <argument index="1" name="polygon_index" type="int" />
  29. <description>
  30. Returns the points of the polygon at index [code]polygon_index[/code] for TileSet physics layer with index [code]layer_id[/code].
  31. </description>
  32. </method>
  33. <method name="get_collision_polygons_count" qualifiers="const">
  34. <return type="int" />
  35. <argument index="0" name="layer_id" type="int" />
  36. <description>
  37. Returns how many polygons the tile has for TileSet physics layer with index [code]layer_id[/code].
  38. </description>
  39. </method>
  40. <method name="get_constant_angular_velocity" qualifiers="const">
  41. <return type="float" />
  42. <argument index="0" name="layer_id" type="int" />
  43. <description>
  44. Returns the constant angular velocity applied to objects colliding with this tile.
  45. </description>
  46. </method>
  47. <method name="get_constant_linear_velocity" qualifiers="const">
  48. <return type="Vector2" />
  49. <argument index="0" name="layer_id" type="int" />
  50. <description>
  51. Returns the constant linear velocity applied to objects colliding with this tile.
  52. </description>
  53. </method>
  54. <method name="get_custom_data" qualifiers="const">
  55. <return type="Variant" />
  56. <argument index="0" name="layer_name" type="String" />
  57. <description>
  58. Returns the custom data value for custom data layer named [code]layer_name[/code].
  59. </description>
  60. </method>
  61. <method name="get_custom_data_by_layer_id" qualifiers="const">
  62. <return type="Variant" />
  63. <argument index="0" name="layer_id" type="int" />
  64. <description>
  65. Returns the custom data value for custom data layer with index [code]layer_id[/code].
  66. </description>
  67. </method>
  68. <method name="get_navigation_polygon" qualifiers="const">
  69. <return type="NavigationPolygon" />
  70. <argument index="0" name="layer_id" type="int" />
  71. <description>
  72. Returns the navigation polygon of the tile for the TileSet navigation layer with index [code]layer_id[/code].
  73. </description>
  74. </method>
  75. <method name="get_occluder" qualifiers="const">
  76. <return type="OccluderPolygon2D" />
  77. <argument index="0" name="layer_id" type="int" />
  78. <description>
  79. Returns the occluder polygon of the tile for the TileSet occlusion layer with index [code]layer_id[/code].
  80. </description>
  81. </method>
  82. <method name="get_peering_bit_terrain" qualifiers="const">
  83. <return type="int" />
  84. <argument index="0" name="peering_bit" type="int" enum="TileSet.CellNeighbor" />
  85. <description>
  86. Returns the tile's terrain bit for the given [code]peering_bit[/code] direction.
  87. </description>
  88. </method>
  89. <method name="is_collision_polygon_one_way" qualifiers="const">
  90. <return type="bool" />
  91. <argument index="0" name="layer_id" type="int" />
  92. <argument index="1" name="polygon_index" type="int" />
  93. <description>
  94. Returns whether one-way collisions are enabled for the polygon at index [code]polygon_index[/code] for TileSet physics layer with index [code]layer_id[/code].
  95. </description>
  96. </method>
  97. <method name="remove_collision_polygon">
  98. <return type="void" />
  99. <argument index="0" name="layer_id" type="int" />
  100. <argument index="1" name="polygon_index" type="int" />
  101. <description>
  102. Removes the polygon at index [code]polygon_index[/code] for TileSet physics layer with index [code]layer_id[/code].
  103. </description>
  104. </method>
  105. <method name="set_collision_polygon_one_way">
  106. <return type="void" />
  107. <argument index="0" name="layer_id" type="int" />
  108. <argument index="1" name="polygon_index" type="int" />
  109. <argument index="2" name="one_way" type="bool" />
  110. <description>
  111. Enables/disables one-way collisions on the polygon at index [code]polygon_index[/code] for TileSet physics layer with index [code]layer_id[/code].
  112. </description>
  113. </method>
  114. <method name="set_collision_polygon_one_way_margin">
  115. <return type="void" />
  116. <argument index="0" name="layer_id" type="int" />
  117. <argument index="1" name="polygon_index" type="int" />
  118. <argument index="2" name="one_way_margin" type="float" />
  119. <description>
  120. Enables/disables one-way collisions on the polygon at index [code]polygon_index[/code] for TileSet physics layer with index [code]layer_id[/code].
  121. </description>
  122. </method>
  123. <method name="set_collision_polygon_points">
  124. <return type="void" />
  125. <argument index="0" name="layer_id" type="int" />
  126. <argument index="1" name="polygon_index" type="int" />
  127. <argument index="2" name="polygon" type="PackedVector2Array" />
  128. <description>
  129. Sets the points of the polygon at index [code]polygon_index[/code] for TileSet physics layer with index [code]layer_id[/code].
  130. </description>
  131. </method>
  132. <method name="set_collision_polygons_count">
  133. <return type="void" />
  134. <argument index="0" name="layer_id" type="int" />
  135. <argument index="1" name="polygons_count" type="int" />
  136. <description>
  137. Sets the polygons count for TileSet physics layer with index [code]layer_id[/code].
  138. </description>
  139. </method>
  140. <method name="set_constant_angular_velocity">
  141. <return type="void" />
  142. <argument index="0" name="layer_id" type="int" />
  143. <argument index="1" name="velocity" type="float" />
  144. <description>
  145. Sets the constant angular velocity. This does not rotate the tile. This angular velocity is applied to objects colliding with this tile.
  146. </description>
  147. </method>
  148. <method name="set_constant_linear_velocity">
  149. <return type="void" />
  150. <argument index="0" name="layer_id" type="int" />
  151. <argument index="1" name="velocity" type="Vector2" />
  152. <description>
  153. 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.
  154. </description>
  155. </method>
  156. <method name="set_custom_data">
  157. <return type="void" />
  158. <argument index="0" name="layer_name" type="String" />
  159. <argument index="1" name="value" type="Variant" />
  160. <description>
  161. Sets the tile's custom data value for the TileSet custom data layer with name [code]layer_name[/code].
  162. </description>
  163. </method>
  164. <method name="set_custom_data_by_layer_id">
  165. <return type="void" />
  166. <argument index="0" name="layer_id" type="int" />
  167. <argument index="1" name="value" type="Variant" />
  168. <description>
  169. Sets the tile's custom data value for the TileSet custom data layer with index [code]layer_id[/code].
  170. </description>
  171. </method>
  172. <method name="set_navigation_polygon">
  173. <return type="void" />
  174. <argument index="0" name="layer_id" type="int" />
  175. <argument index="1" name="navigation_polygon" type="NavigationPolygon" />
  176. <description>
  177. Sets the navigation polygon for the TileSet navigation layer with index [code]layer_id[/code].
  178. </description>
  179. </method>
  180. <method name="set_occluder">
  181. <return type="void" />
  182. <argument index="0" name="layer_id" type="int" />
  183. <argument index="1" name="occluder_polygon" type="OccluderPolygon2D" />
  184. <description>
  185. Sets the occluder for the TileSet occlusion layer with index [code]layer_id[/code].
  186. </description>
  187. </method>
  188. <method name="set_peering_bit_terrain">
  189. <return type="void" />
  190. <argument index="0" name="peering_bit" type="int" enum="TileSet.CellNeighbor" />
  191. <argument index="1" name="terrain" type="int" />
  192. <description>
  193. Sets the tile's terrain bit for the given [code]peering_bit[/code] direction.
  194. </description>
  195. </method>
  196. </methods>
  197. <members>
  198. <member name="flip_h" type="bool" setter="set_flip_h" getter="get_flip_h" default="false">
  199. </member>
  200. <member name="flip_v" type="bool" setter="set_flip_v" getter="get_flip_v" default="false">
  201. </member>
  202. <member name="material" type="ShaderMaterial" setter="set_material" getter="get_material">
  203. </member>
  204. <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color(1, 1, 1, 1)">
  205. </member>
  206. <member name="probability" type="float" setter="set_probability" getter="get_probability" default="1.0">
  207. </member>
  208. <member name="terrain_set" type="int" setter="set_terrain_set" getter="get_terrain_set" default="-1">
  209. </member>
  210. <member name="texture_offset" type="Vector2i" setter="set_texture_offset" getter="get_texture_offset" default="Vector2i(0, 0)">
  211. </member>
  212. <member name="transpose" type="bool" setter="set_transpose" getter="get_transpose" default="false">
  213. </member>
  214. <member name="y_sort_origin" type="int" setter="set_y_sort_origin" getter="get_y_sort_origin" default="0">
  215. </member>
  216. <member name="z_index" type="int" setter="set_z_index" getter="get_z_index" default="0">
  217. </member>
  218. </members>
  219. <signals>
  220. <signal name="changed">
  221. <description>
  222. </description>
  223. </signal>
  224. </signals>
  225. </class>