test_character_tilemap.tscn 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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. __meta__ = {
  27. "_edit_use_anchors_": false
  28. }
  29. [node name="Options" parent="." instance=ExtResource( "3" )]
  30. [node name="LabelFloor" type="Label" parent="."]
  31. offset_left = 14.0
  32. offset_top = 237.929
  33. offset_right = 145.0
  34. offset_bottom = 251.929
  35. text = "ON FLOOR"
  36. __meta__ = {
  37. "_edit_use_anchors_": false
  38. }
  39. [node name="LabelControls" type="Label" parent="."]
  40. offset_left = 14.0
  41. offset_top = 263.291
  42. offset_right = 145.0
  43. offset_bottom = 277.291
  44. text = "LEFT/RIGHT - MOVE
  45. UP - JUMP"
  46. __meta__ = {
  47. "_edit_use_anchors_": false
  48. }
  49. [node name="CharacterBody2D" type="CharacterBody2D" parent="."]
  50. position = Vector2(250, 460)
  51. collision_mask = 2147483649
  52. script = ExtResource( "7" )
  53. [node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
  54. shape = SubResource( "2" )
  55. [node name="CharacterBodyRay2D" type="CharacterBody2D" parent="."]
  56. position = Vector2(250, 460)
  57. collision_mask = 2147483649
  58. script = ExtResource( "7" )
  59. [node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBodyRay2D"]
  60. position = Vector2(0, -8)
  61. shape = SubResource( "RectangleShape2D_jx2e1" )
  62. [node name="CollisionShapeRay2D" type="CollisionShape2D" parent="CharacterBodyRay2D"]
  63. position = Vector2(0, 8)
  64. shape = SubResource( "RayShape2D_206f5" )
  65. [node name="CollisionShapeRay2DLeft" type="CollisionShape2D" parent="CharacterBodyRay2D"]
  66. position = Vector2(-12, 8)
  67. shape = SubResource( "RayShape2D_206f5" )
  68. [node name="CollisionShapeRay2DRight" type="CollisionShape2D" parent="CharacterBodyRay2D"]
  69. position = Vector2(12, 8)
  70. shape = SubResource( "RayShape2D_206f5" )
  71. [node name="RigidDynamicBody2D" type="RigidDynamicBody2D" parent="."]
  72. position = Vector2(250, 460)
  73. collision_mask = 2147483649
  74. physics_material_override = SubResource( "1" )
  75. contacts_reported = 4
  76. contact_monitor = true
  77. lock_rotation = true
  78. script = ExtResource( "6" )
  79. [node name="CollisionShape2D" type="CollisionShape2D" parent="RigidDynamicBody2D"]
  80. shape = SubResource( "2" )
  81. [node name="RigidBodyRay2D" type="RigidDynamicBody2D" parent="."]
  82. position = Vector2(250, 460)
  83. collision_mask = 2147483649
  84. physics_material_override = SubResource( "1" )
  85. contacts_reported = 4
  86. contact_monitor = true
  87. lock_rotation = true
  88. script = ExtResource( "6" )
  89. [node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBodyRay2D"]
  90. position = Vector2(0, -8)
  91. shape = SubResource( "RectangleShape2D_jx2e1" )
  92. [node name="CollisionShapeRay2D" type="CollisionShape2D" parent="RigidBodyRay2D"]
  93. position = Vector2(0, 8)
  94. shape = SubResource( "RayShape2D_206f5" )
  95. [node name="CollisionShapeRay2DLeft" type="CollisionShape2D" parent="RigidBodyRay2D"]
  96. position = Vector2(-12, 8)
  97. shape = SubResource( "RayShape2D_206f5" )
  98. [node name="CollisionShapeRay2DRight" type="CollisionShape2D" parent="RigidBodyRay2D"]
  99. position = Vector2(12, 8)
  100. shape = SubResource( "RayShape2D_206f5" )
  101. [node name="JumpTargetArea2D" type="Area2D" parent="."]
  102. visible = false
  103. position = Vector2(810, 390)
  104. [node name="CollisionShape2D" type="CollisionShape2D" parent="JumpTargetArea2D"]
  105. shape = SubResource( "5" )
  106. disabled = true
  107. [node name="FallTargetArea2D" type="Area2D" parent="."]
  108. visible = false
  109. position = Vector2(250, 480)
  110. [node name="CollisionShape2D" type="CollisionShape2D" parent="FallTargetArea2D"]
  111. shape = SubResource( "5" )
  112. disabled = true
  113. [node name="StaticSceneFlat" parent="." instance=ExtResource( "4" )]
  114. position = Vector2(0, 12)
  115. [node name="TileMap" type="TileMap" parent="."]
  116. scale = Vector2(2, 2)
  117. tile_set = ExtResource( "5" )
  118. collision_visibility_mode = 1
  119. format = 2
  120. 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)