tileset_edit.tscn 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. [gd_scene load_steps=2 format=2]
  2. [ext_resource path="res://tiles_demo.png" type="Texture" id=1]
  3. [node name="Node" type="Node"]
  4. [node name="floor" type="Sprite" parent="."]
  5. texture = ExtResource( 1 )
  6. region_enabled = true
  7. region_rect = Rect2( 0, 0, 64, 64 )
  8. [node name="collision" type="StaticBody2D" parent="floor"]
  9. input_pickable = false
  10. collision_layer = 1
  11. collision_mask = 1
  12. constant_linear_velocity = Vector2( 0, 0 )
  13. constant_angular_velocity = 0.0
  14. friction = 1.0
  15. bounce = 0.0
  16. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="floor/collision"]
  17. build_mode = 0
  18. polygon = PoolVector2Array( 32, -24, 32, 32, -32, 32, -32, -24 )
  19. [node name="edge" type="Sprite" parent="."]
  20. position = Vector2( 64, 0 )
  21. texture = ExtResource( 1 )
  22. region_enabled = true
  23. region_rect = Rect2( 64, 0, 64, 64 )
  24. [node name="collision" type="StaticBody2D" parent="edge"]
  25. input_pickable = false
  26. collision_layer = 1
  27. collision_mask = 1
  28. constant_linear_velocity = Vector2( 0, 0 )
  29. constant_angular_velocity = 0.0
  30. friction = 1.0
  31. bounce = 0.0
  32. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="edge/collision"]
  33. build_mode = 0
  34. polygon = PoolVector2Array( -32, -24, 24, -24, 24, 32, -32, 32 )
  35. [node name="wall" type="Sprite" parent="."]
  36. position = Vector2( 64, 64 )
  37. texture = ExtResource( 1 )
  38. region_enabled = true
  39. region_rect = Rect2( 64, 64, 64, 64 )
  40. [node name="collision" type="StaticBody2D" parent="wall"]
  41. input_pickable = false
  42. collision_layer = 1
  43. collision_mask = 1
  44. constant_linear_velocity = Vector2( 0, 0 )
  45. constant_angular_velocity = 0.0
  46. friction = 1.0
  47. bounce = 0.0
  48. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="wall/collision"]
  49. build_mode = 0
  50. polygon = PoolVector2Array( -32, -32, 24, -32, 24, 32, -32, 32 )
  51. [node name="wall_deco" type="Sprite" parent="."]
  52. position = Vector2( 96, 128 )
  53. texture = ExtResource( 1 )
  54. region_enabled = true
  55. region_rect = Rect2( 320, 128, 128, 64 )
  56. [node name="collision" type="StaticBody2D" parent="wall_deco"]
  57. input_pickable = false
  58. collision_layer = 1
  59. collision_mask = 1
  60. constant_linear_velocity = Vector2( 0, 0 )
  61. constant_angular_velocity = 0.0
  62. friction = 1.0
  63. bounce = 0.0
  64. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="wall_deco/collision"]
  65. build_mode = 0
  66. polygon = PoolVector2Array( -64, -32, -8, -32, -8, 32, -64, 32 )
  67. [node name="corner" type="Sprite" parent="."]
  68. position = Vector2( 64, 192 )
  69. texture = ExtResource( 1 )
  70. region_enabled = true
  71. region_rect = Rect2( 64, 128, 64, 64 )
  72. [node name="collision" type="StaticBody2D" parent="corner"]
  73. input_pickable = false
  74. collision_layer = 1
  75. collision_mask = 1
  76. constant_linear_velocity = Vector2( 0, 0 )
  77. constant_angular_velocity = 0.0
  78. friction = 1.0
  79. bounce = 0.0
  80. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="corner/collision"]
  81. build_mode = 0
  82. polygon = PoolVector2Array( -32, -32, 24, -32, 32, -24, 32, 32, -32, 32 )
  83. [node name="flowers" type="Sprite" parent="."]
  84. position = Vector2( 128, 192 )
  85. texture = ExtResource( 1 )
  86. region_enabled = true
  87. region_rect = Rect2( 192, 192, 64, 64 )
  88. [node name="collision" type="StaticBody2D" parent="flowers"]
  89. input_pickable = false
  90. collision_layer = 1
  91. collision_mask = 1
  92. constant_linear_velocity = Vector2( 0, 0 )
  93. constant_angular_velocity = 0.0
  94. friction = 1.0
  95. bounce = 0.0
  96. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="flowers/collision"]
  97. build_mode = 0
  98. polygon = PoolVector2Array( -32, 32, 32, 32, 32, -24, -32, -24 )
  99. [node name="tree_base" type="Sprite" parent="."]
  100. position = Vector2( 192, 192 )
  101. texture = ExtResource( 1 )
  102. region_enabled = true
  103. region_rect = Rect2( 256, 192, 64, 64 )
  104. [node name="collision" type="StaticBody2D" parent="tree_base"]
  105. input_pickable = false
  106. collision_layer = 1
  107. collision_mask = 1
  108. constant_linear_velocity = Vector2( 0, 0 )
  109. constant_angular_velocity = 0.0
  110. friction = 1.0
  111. bounce = 0.0
  112. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="tree_base/collision"]
  113. build_mode = 0
  114. polygon = PoolVector2Array( -32, 32, 32, 32, 32, -24, -32, -24 )
  115. [node name="tree_mid" type="Sprite" parent="."]
  116. position = Vector2( 192, 128 )
  117. texture = ExtResource( 1 )
  118. region_enabled = true
  119. region_rect = Rect2( 256, 128, 64, 64 )
  120. [node name="tree_mid 2" type="Sprite" parent="."]
  121. position = Vector2( 192, 64 )
  122. texture = ExtResource( 1 )
  123. region_enabled = true
  124. region_rect = Rect2( 256, 64, 64, 64 )
  125. [node name="tree_top" type="Sprite" parent="."]
  126. position = Vector2( 192, 0 )
  127. texture = ExtResource( 1 )
  128. region_enabled = true
  129. region_rect = Rect2( 256, 0, 64, 64 )
  130. [node name="solid" type="Sprite" parent="."]
  131. position = Vector2( 0, 64 )
  132. texture = ExtResource( 1 )
  133. region_enabled = true
  134. region_rect = Rect2( 0, 64, 64, 64 )
  135. [node name="ceiling" type="Sprite" parent="."]
  136. position = Vector2( 0, 128 )
  137. texture = ExtResource( 1 )
  138. region_enabled = true
  139. region_rect = Rect2( 384, 64, 64, 64 )
  140. [node name="collision" type="StaticBody2D" parent="ceiling"]
  141. input_pickable = false
  142. collision_layer = 1
  143. collision_mask = 1
  144. constant_linear_velocity = Vector2( 0, 0 )
  145. constant_angular_velocity = 0.0
  146. friction = 1.0
  147. bounce = 0.0
  148. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="ceiling/collision"]
  149. build_mode = 0
  150. polygon = PoolVector2Array( 32, -32, 32, 32, -32, 32, -32, -32 )
  151. [node name="ramp" type="Sprite" parent="."]
  152. position = Vector2( 256, 224 )
  153. texture = ExtResource( 1 )
  154. region_enabled = true
  155. region_rect = Rect2( 128, 128, 64, 128 )
  156. [node name="collision" type="StaticBody2D" parent="ramp"]
  157. input_pickable = false
  158. collision_layer = 1
  159. collision_mask = 1
  160. constant_linear_velocity = Vector2( 0, 0 )
  161. constant_angular_velocity = 0.0
  162. friction = 1.0
  163. bounce = 0.0
  164. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="ramp/collision"]
  165. build_mode = 0
  166. polygon = PoolVector2Array( -32, -56, 32, 8, 32, 64, -32, 64 )
  167. [node name="ceiling2wall" type="Sprite" parent="."]
  168. position = Vector2( 0, 192 )
  169. texture = ExtResource( 1 )
  170. region_enabled = true
  171. region_rect = Rect2( 448, 64, 64, 64 )
  172. [node name="collision" type="StaticBody2D" parent="ceiling2wall"]
  173. input_pickable = false
  174. collision_layer = 1
  175. collision_mask = 1
  176. constant_linear_velocity = Vector2( 0, 0 )
  177. constant_angular_velocity = 0.0
  178. friction = 1.0
  179. bounce = 0.0
  180. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="ceiling2wall/collision"]
  181. build_mode = 0
  182. polygon = PoolVector2Array( -32, -32, 24, -32, 24, 32, -32, 32 )
  183. [node name="platform_floor" type="Sprite" parent="."]
  184. position = Vector2( 0, 256 )
  185. texture = ExtResource( 1 )
  186. region_enabled = true
  187. region_rect = Rect2( 128, 0, 64, 64 )
  188. [node name="collision" type="StaticBody2D" parent="platform_floor"]
  189. input_pickable = false
  190. collision_layer = 1
  191. collision_mask = 1
  192. constant_linear_velocity = Vector2( 0, 0 )
  193. constant_angular_velocity = 0.0
  194. friction = 1.0
  195. bounce = 0.0
  196. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="platform_floor/collision"]
  197. build_mode = 0
  198. polygon = PoolVector2Array( 32, -24, 32, 24, -32, 24, -32, -24 )
  199. [node name="platform_edge" type="Sprite" parent="."]
  200. position = Vector2( 64, 256 )
  201. texture = ExtResource( 1 )
  202. region_enabled = true
  203. region_rect = Rect2( 192, 0, 64, 64 )
  204. [node name="collision" type="StaticBody2D" parent="platform_edge"]
  205. input_pickable = false
  206. collision_layer = 1
  207. collision_mask = 1
  208. constant_linear_velocity = Vector2( 0, 0 )
  209. constant_angular_velocity = 0.0
  210. friction = 1.0
  211. bounce = 0.0
  212. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="platform_edge/collision"]
  213. build_mode = 0
  214. polygon = PoolVector2Array( 24, -24, 24, 24, -32, 24, -32, -24 )
  215. [node name="help" type="Label" parent="."]
  216. anchor_left = 0.0
  217. anchor_top = 0.0
  218. anchor_right = 0.0
  219. anchor_bottom = 0.0
  220. margin_left = 1.0
  221. margin_top = 331.0
  222. margin_right = 727.0
  223. margin_bottom = 422.0
  224. rect_pivot_offset = Vector2( 0, 0 )
  225. rect_clip_content = false
  226. mouse_filter = 2
  227. size_flags_horizontal = 2
  228. size_flags_vertical = 0
  229. text = "This scene serves as a tool for editing the tileset.
  230. Nodes (sprites) and their respective collisionsare edited here.
  231. To create a tileset from this, a \"TileSet\" resoucre must be created. Use the helper in: Scene -> Convert To -> TileSet.
  232. This will save a tileset. Saving over it will merge your changes.
  233. Finally, the saved tileset resource (tileset.tres in this case), can be opened to be used into a TileMap node for editing a tile map."
  234. percent_visible = 1.0
  235. lines_skipped = 0
  236. max_lines_visible = -1