test_character_tilemap.tscn 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. [gd_scene load_steps=12 format=3 uid="uid://b7fcmfv5sqxfo"]
  2. [ext_resource type="Script" path="res://tests/functional/test_character_tilemap.gd" id="1"]
  3. [ext_resource type="PackedScene" uid="uid://blh3twy74kbkv" path="res://tests/test_options.tscn" id="3"]
  4. [ext_resource type="PackedScene" uid="uid://cx2q80okt25o1" path="res://tests/static_scene_flat.tscn" id="4"]
  5. [ext_resource type="TileSet" uid="uid://rgfdpxlejxl3" path="res://assets/tileset/tileset.tres" id="5"]
  6. [ext_resource type="Script" path="res://utils/rigidbody_controller.gd" id="6"]
  7. [ext_resource type="Script" path="res://utils/characterbody_controller.gd" id="7"]
  8. [sub_resource type="RectangleShape2D" id="2"]
  9. size = Vector2(32, 63.9)
  10. [sub_resource type="RectangleShape2D" id="RectangleShape2D_jx2e1"]
  11. size = Vector2(32, 47.8)
  12. [sub_resource type="SeparationRayShape2D" id="RayShape2D_206f5"]
  13. length = 24.0
  14. [sub_resource type="PhysicsMaterial" id="1"]
  15. friction = 0.0
  16. [sub_resource type="CircleShape2D" id="5"]
  17. radius = 16.0
  18. [node name="Test" type="Node2D"]
  19. script = ExtResource("1")
  20. [node name="LabelTestType" type="Label" parent="."]
  21. offset_left = 14.0
  22. offset_top = 79.0
  23. offset_right = 145.0
  24. offset_bottom = 93.0
  25. text = "Testing: "
  26. [node name="Options" parent="." instance=ExtResource("3")]
  27. [node name="LabelFloor" type="Label" parent="."]
  28. offset_left = 14.0
  29. offset_top = 237.929
  30. offset_right = 145.0
  31. offset_bottom = 251.929
  32. text = "ON FLOOR"
  33. [node name="LabelControls" type="Label" parent="."]
  34. offset_left = 14.0
  35. offset_top = 263.291
  36. offset_right = 145.0
  37. offset_bottom = 277.291
  38. text = "LEFT/RIGHT - MOVE
  39. UP - JUMP"
  40. [node name="CharacterBody2D" type="CharacterBody2D" parent="."]
  41. position = Vector2(250, 460)
  42. collision_mask = 2147483649
  43. script = ExtResource("7")
  44. [node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
  45. shape = SubResource("2")
  46. [node name="CharacterBodyRay2D" type="CharacterBody2D" parent="."]
  47. position = Vector2(250, 460)
  48. collision_mask = 2147483649
  49. script = ExtResource("7")
  50. [node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBodyRay2D"]
  51. position = Vector2(0, -8)
  52. shape = SubResource("RectangleShape2D_jx2e1")
  53. [node name="CollisionShapeRay2D" type="CollisionShape2D" parent="CharacterBodyRay2D"]
  54. position = Vector2(0, 8)
  55. shape = SubResource("RayShape2D_206f5")
  56. [node name="CollisionShapeRay2DLeft" type="CollisionShape2D" parent="CharacterBodyRay2D"]
  57. position = Vector2(-12, 8)
  58. shape = SubResource("RayShape2D_206f5")
  59. [node name="CollisionShapeRay2DRight" type="CollisionShape2D" parent="CharacterBodyRay2D"]
  60. position = Vector2(12, 8)
  61. shape = SubResource("RayShape2D_206f5")
  62. [node name="RigidDynamicBody2D" type="RigidBody2D" parent="."]
  63. position = Vector2(250, 460)
  64. collision_mask = 2147483649
  65. physics_material_override = SubResource("1")
  66. lock_rotation = true
  67. contact_monitor = true
  68. script = ExtResource("6")
  69. [node name="CollisionShape2D" type="CollisionShape2D" parent="RigidDynamicBody2D"]
  70. shape = SubResource("2")
  71. [node name="RigidBodyRay2D" type="RigidBody2D" parent="."]
  72. position = Vector2(250, 460)
  73. collision_mask = 2147483649
  74. physics_material_override = SubResource("1")
  75. lock_rotation = true
  76. contact_monitor = true
  77. script = ExtResource("6")
  78. [node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBodyRay2D"]
  79. position = Vector2(0, -8)
  80. shape = SubResource("RectangleShape2D_jx2e1")
  81. [node name="CollisionShapeRay2D" type="CollisionShape2D" parent="RigidBodyRay2D"]
  82. position = Vector2(0, 8)
  83. shape = SubResource("RayShape2D_206f5")
  84. [node name="CollisionShapeRay2DLeft" type="CollisionShape2D" parent="RigidBodyRay2D"]
  85. position = Vector2(-12, 8)
  86. shape = SubResource("RayShape2D_206f5")
  87. [node name="CollisionShapeRay2DRight" type="CollisionShape2D" parent="RigidBodyRay2D"]
  88. position = Vector2(12, 8)
  89. shape = SubResource("RayShape2D_206f5")
  90. [node name="JumpTargetArea2D" type="Area2D" parent="."]
  91. visible = false
  92. position = Vector2(810, 390)
  93. [node name="CollisionShape2D" type="CollisionShape2D" parent="JumpTargetArea2D"]
  94. shape = SubResource("5")
  95. disabled = true
  96. [node name="FallTargetArea2D" type="Area2D" parent="."]
  97. visible = false
  98. position = Vector2(250, 480)
  99. [node name="CollisionShape2D" type="CollisionShape2D" parent="FallTargetArea2D"]
  100. shape = SubResource("5")
  101. disabled = true
  102. [node name="StaticSceneFlat" parent="." instance=ExtResource("4")]
  103. position = Vector2(0, 12)
  104. [node name="TileMap" type="TileMap" parent="."]
  105. texture_filter = 1
  106. scale = Vector2(2, 2)
  107. tile_set = ExtResource("5")
  108. collision_visibility_mode = 1
  109. format = 2
  110. layer_0/tile_data = PackedInt32Array(786438, 65536, 0, 786439, 65536, 0, 786440, 65536, 0, 786441, 65536, 0, 458764, 65536, 0, 524300, 65536, 0, 589836, 65536, 0, 655372, 65536, 0, 720908, 65536, 0, 786444, 65536, 0, 851980, 65536, 0, 917516, 65536, 0, 983052, 65536, 0, 458765, 65536, 0, 524301, 65536, 0, 589837, 65536, 0, 655373, 65536, 0, 720909, 65536, 0, 786445, 65536, 0, 851981, 65536, 0, 917517, 65536, 0, 983053, 65536, 0, 458766, 65536, 0, 524302, 65536, 0, 589838, 65536, 0, 655374, 65536, 0, 720910, 65536, 0, 786446, 65536, 0, 851982, 65536, 0, 917518, 65536, 0, 983054, 65536, 0, 458767, 65536, 0, 524303, 65536, 0, 589839, 65536, 0, 655375, 65536, 0, 720911, 65536, 0, 786447, 65536, 0, 851983, 65536, 0, 917519, 65536, 0, 983055, 65536, 0, 458768, 65536, 0, 524304, 65536, 0, 589840, 65536, 0, 655376, 65536, 0, 720912, 65536, 0, 786448, 65536, 0, 851984, 65536, 0, 917520, 65536, 0, 983056, 65536, 0, 458769, 65536, 0, 524305, 65536, 0, 589841, 65536, 0, 655377, 65536, 0, 720913, 65536, 0, 786449, 65536, 0, 851985, 65536, 0, 917521, 65536, 0, 983057, 65536, 0, 458770, 65536, 0, 524306, 65536, 0, 589842, 65536, 0, 655378, 65536, 0, 720914, 65536, 0, 786450, 65536, 0, 851986, 65536, 0, 917522, 65536, 0, 983058, 65536, 0, 458771, 65536, 0, 524307, 65536, 0, 589843, 65536, 0, 655379, 65536, 0, 720915, 65536, 0, 786451, 65536, 0, 851987, 65536, 0, 917523, 65536, 0, 983059, 65536, 0, 851992, 0, 0, 851993, 0, 0, 720922, 0, 0, 851994, 0, 0, 720923, 0, 0, 851995, 0, 0, 720924, 0, 0, 720925, 0, 0)