tileset_edit.tscn 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. [gd_scene load_steps=2 format=2]
  2. [ext_resource path="res://tiles_demo.png" type="Texture2D" id=1]
  3. [node name="TilesetEdit" type="Node2D"]
  4. [node name="Floor" type="Sprite2D" parent="."]
  5. texture = ExtResource( 1 )
  6. region_rect = Rect2(0, 0, 32, 32)
  7. [node name="Collision" type="StaticBody2D" parent="Floor"]
  8. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Floor/Collision"]
  9. polygon = PackedVector2Array(16, -12, 16, 16, -16, 16, -16, -12)
  10. [node name="Edge" type="Sprite2D" parent="."]
  11. position = Vector2(32, 0)
  12. texture = ExtResource( 1 )
  13. region_rect = Rect2(32, 0, 32, 32)
  14. [node name="Collision" type="StaticBody2D" parent="Edge"]
  15. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Edge/Collision"]
  16. polygon = PackedVector2Array(-16, -12, 12, -12, 12, 16, -16, 16)
  17. [node name="Wall" type="Sprite2D" parent="."]
  18. position = Vector2(32, 32)
  19. texture = ExtResource( 1 )
  20. region_rect = Rect2(32, 32, 32, 32)
  21. [node name="Collision" type="StaticBody2D" parent="Wall"]
  22. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Wall/Collision"]
  23. polygon = PackedVector2Array(-16, -16, 12, -16, 12, 16, -16, 16)
  24. [node name="WallDeco" type="Sprite2D" parent="."]
  25. position = Vector2(48, 64)
  26. texture = ExtResource( 1 )
  27. region_rect = Rect2(160, 64, 64, 32)
  28. [node name="Collision" type="StaticBody2D" parent="WallDeco"]
  29. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="WallDeco/Collision"]
  30. polygon = PackedVector2Array(-32, -16, -4, -16, -4, 16, -32, 16)
  31. [node name="Corner" type="Sprite2D" parent="."]
  32. position = Vector2(32, 96)
  33. texture = ExtResource( 1 )
  34. region_rect = Rect2(32, 64, 32, 32)
  35. [node name="Collision" type="StaticBody2D" parent="Corner"]
  36. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Corner/Collision"]
  37. polygon = PackedVector2Array(-16, -16, 12, -16, 16, -12, 16, 16, -16, 16)
  38. [node name="Flowers" type="Sprite2D" parent="."]
  39. position = Vector2(64, 96)
  40. texture = ExtResource( 1 )
  41. region_rect = Rect2(96, 96, 32, 32)
  42. [node name="Collision" type="StaticBody2D" parent="Flowers"]
  43. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Flowers/Collision"]
  44. polygon = PackedVector2Array(-16, 16, 16, 16, 16, -12, -16, -12)
  45. [node name="TreeBase" type="Sprite2D" parent="."]
  46. position = Vector2(96, 96)
  47. texture = ExtResource( 1 )
  48. region_rect = Rect2(128, 96, 32, 32)
  49. [node name="Collision" type="StaticBody2D" parent="TreeBase"]
  50. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="TreeBase/Collision"]
  51. polygon = PackedVector2Array(-16, 16, 16, 16, 16, -12, -16, -12)
  52. [node name="TreeMid" type="Sprite2D" parent="."]
  53. position = Vector2(96, 64)
  54. texture = ExtResource( 1 )
  55. region_rect = Rect2(128, 64, 32, 32)
  56. [node name="TreeMid2" type="Sprite2D" parent="."]
  57. position = Vector2(96, 32)
  58. texture = ExtResource( 1 )
  59. region_rect = Rect2(128, 32, 32, 32)
  60. [node name="TreeTop" type="Sprite2D" parent="."]
  61. position = Vector2(96, 0)
  62. texture = ExtResource( 1 )
  63. region_rect = Rect2(128, 0, 32, 32)
  64. [node name="Solid" type="Sprite2D" parent="."]
  65. position = Vector2(0, 32)
  66. texture = ExtResource( 1 )
  67. region_rect = Rect2(0, 32, 32, 32)
  68. [node name="Ceiling" type="Sprite2D" parent="."]
  69. position = Vector2(0, 64)
  70. texture = ExtResource( 1 )
  71. region_rect = Rect2(192, 32, 32, 32)
  72. [node name="Collision" type="StaticBody2D" parent="Ceiling"]
  73. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Ceiling/Collision"]
  74. polygon = PackedVector2Array(16, -16, 16, 16, -16, 16, -16, -16)
  75. [node name="Ramp" type="Sprite2D" parent="."]
  76. position = Vector2(128, 112)
  77. texture = ExtResource( 1 )
  78. region_rect = Rect2(64, 64, 32, 64)
  79. [node name="Collision" type="StaticBody2D" parent="Ramp"]
  80. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Ramp/Collision"]
  81. polygon = PackedVector2Array(-16, -28, 16, 4, 16, 32, -16, 32)
  82. [node name="CeilingWall" type="Sprite2D" parent="."]
  83. position = Vector2(0, 96)
  84. texture = ExtResource( 1 )
  85. region_rect = Rect2(224, 32, 32, 32)
  86. [node name="Collision" type="StaticBody2D" parent="CeilingWall"]
  87. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="CeilingWall/Collision"]
  88. polygon = PackedVector2Array(-16, -16, 12, -16, 12, 16, -16, 16)
  89. [node name="PlatformFloor" type="Sprite2D" parent="."]
  90. position = Vector2(0, 128)
  91. texture = ExtResource( 1 )
  92. region_rect = Rect2(64, 0, 32, 32)
  93. [node name="Collision" type="StaticBody2D" parent="PlatformFloor"]
  94. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="PlatformFloor/Collision"]
  95. polygon = PackedVector2Array(16, -12, 16, 12, -16, 12, -16, -12)
  96. [node name="PlatformEdge" type="Sprite2D" parent="."]
  97. position = Vector2(32, 128)
  98. texture = ExtResource( 1 )
  99. region_rect = Rect2(96, 0, 32, 32)
  100. [node name="Collision" type="StaticBody2D" parent="PlatformEdge"]
  101. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="PlatformEdge/Collision"]
  102. polygon = PackedVector2Array(12, -12, 12, 12, -16, 12, -16, -12)
  103. [node name="Help" type="Label" parent="."]
  104. offset_left = 1.0
  105. offset_top = 331.0
  106. offset_right = 727.0
  107. offset_bottom = 422.0
  108. size_flags_horizontal = 2
  109. text = "This scene serves as a tool for editing the tileset.
  110. Nodes (sprites) and their respective collisionsare edited here.
  111. To create a tileset from this, a \"TileSet\" resoucre must be created. Use the helper in: Scene -> Convert To -> TileSet.
  112. This will save a tileset. Saving over it will merge your changes.
  113. 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."