world.tscn 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. [gd_scene load_steps=23 format=3 uid="uid://de7qapkqfycxl"]
  2. [ext_resource type="Texture2D" uid="uid://cs8h2qyuakmko" path="res://level/obstacle.png" id="2"]
  3. [ext_resource type="PackedScene" path="res://player/player.tscn" id="3"]
  4. [ext_resource type="Texture2D" uid="uid://cxl5cvsgyxcoe" path="res://level/princess.png" id="4"]
  5. [ext_resource type="Texture2D" uid="uid://1ign8s1w414r" path="res://level/circle.png" id="5"]
  6. [ext_resource type="Texture2D" uid="uid://hp84e6iwjqjy" path="res://level/long_obstacle.png" id="6"]
  7. [ext_resource type="Script" path="res://level/princess.gd" id="7"]
  8. [sub_resource type="PhysicsMaterial" id="PhysicsMaterial_on5ov"]
  9. [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_vnjib"]
  10. texture = ExtResource("2")
  11. 0:0/0 = 0
  12. 0:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
  13. 0:0/0/physics_layer_0/angular_velocity = 0.0
  14. 0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
  15. [sub_resource type="TileSet" id="TileSet_xqlka"]
  16. physics_layer_0/collision_layer = 1
  17. physics_layer_0/physics_material = SubResource("PhysicsMaterial_on5ov")
  18. sources/0 = SubResource("TileSetAtlasSource_vnjib")
  19. [sub_resource type="RectangleShape2D" id="3"]
  20. size = Vector2(16, 16)
  21. [sub_resource type="Animation" id="4"]
  22. length = 10.0
  23. loop_mode = 1
  24. tracks/0/type = "value"
  25. tracks/0/imported = false
  26. tracks/0/enabled = true
  27. tracks/0/path = NodePath(".:position")
  28. tracks/0/interp = 1
  29. tracks/0/loop_wrap = true
  30. tracks/0/keys = {
  31. "times": PackedFloat32Array(0, 1, 5, 6),
  32. "transitions": PackedFloat32Array(1, 1, 1, 1),
  33. "update": 0,
  34. "values": [Vector2(184, 152), Vector2(184, 152), Vector2(328.086, 152), Vector2(328.086, 152)]
  35. }
  36. [sub_resource type="AnimationLibrary" id="AnimationLibrary_2v3oa"]
  37. _data = {
  38. "leftright": SubResource("4")
  39. }
  40. [sub_resource type="Animation" id="5"]
  41. resource_name = "leftright"
  42. length = 10.0
  43. loop_mode = 1
  44. tracks/0/type = "value"
  45. tracks/0/imported = false
  46. tracks/0/enabled = true
  47. tracks/0/path = NodePath(".:position")
  48. tracks/0/interp = 1
  49. tracks/0/loop_wrap = true
  50. tracks/0/keys = {
  51. "times": PackedFloat32Array(0, 1, 5, 6),
  52. "transitions": PackedFloat32Array(1, 1, 1, 1),
  53. "update": 0,
  54. "values": [Vector2(184, 152), Vector2(184, 152), Vector2(328.086, 152), Vector2(328.086, 152)]
  55. }
  56. [sub_resource type="Animation" id="6"]
  57. length = 10.0
  58. loop_mode = 1
  59. tracks/0/type = "value"
  60. tracks/0/imported = false
  61. tracks/0/enabled = true
  62. tracks/0/path = NodePath(".:position")
  63. tracks/0/interp = 1
  64. tracks/0/loop_wrap = true
  65. tracks/0/keys = {
  66. "times": PackedFloat32Array(0, 1, 5, 6),
  67. "transitions": PackedFloat32Array(1, 1, 1, 1),
  68. "update": 0,
  69. "values": [Vector2(88.3493, 296), Vector2(88.3493, 296), Vector2(88.3493, 152), Vector2(88.3493, 152)]
  70. }
  71. [sub_resource type="AnimationLibrary" id="AnimationLibrary_j555p"]
  72. _data = {
  73. "leftright": SubResource("5"),
  74. "updown": SubResource("6")
  75. }
  76. [sub_resource type="RectangleShape2D" id="7"]
  77. size = Vector2(16, 16)
  78. [sub_resource type="RectangleShape2D" id="8"]
  79. size = Vector2(20, 8)
  80. [sub_resource type="CircleShape2D" id="9"]
  81. radius = 32.0
  82. [sub_resource type="Animation" id="10"]
  83. length = 20.0
  84. loop_mode = 1
  85. tracks/0/type = "value"
  86. tracks/0/imported = false
  87. tracks/0/enabled = true
  88. tracks/0/path = NodePath(".:rotation")
  89. tracks/0/interp = 1
  90. tracks/0/loop_wrap = true
  91. tracks/0/keys = {
  92. "times": PackedFloat32Array(0, 5, 10, 15),
  93. "transitions": PackedFloat32Array(-2, -2, -2, -2),
  94. "update": 0,
  95. "values": [0.0, 1.5708, 0.0, -1.5708]
  96. }
  97. [sub_resource type="AnimationLibrary" id="AnimationLibrary_gijtf"]
  98. _data = {
  99. "turn": SubResource("10")
  100. }
  101. [sub_resource type="RectangleShape2D" id="11"]
  102. size = Vector2(16, 16)
  103. [sub_resource type="RectangleShape2D" id="12"]
  104. size = Vector2(64, 16)
  105. [node name="World" type="Node2D"]
  106. [node name="TileMap" type="TileMap" parent="."]
  107. tile_set = SubResource("TileSet_xqlka")
  108. format = 2
  109. layer_0/tile_data = PackedInt32Array(0, 0, 0, 65536, 0, 0, 131072, 0, 0, 196608, 0, 0, 262144, 0, 0, 327680, 0, 0, 393216, 0, 0, 458752, 0, 0, 524288, 0, 0, 589824, 0, 0, 655360, 0, 0, 720896, 0, 0, 786432, 0, 0, 851968, 0, 0, 917504, 0, 0, 983040, 0, 0, 1048576, 0, 0, 1114112, 0, 0, 1179648, 0, 0, 1245184, 0, 0, 1310720, 0, 0, 1376256, 0, 0, 1441792, 0, 0, 1507328, 0, 0, 1572864, 0, 0, 1638400, 0, 0, 1703936, 0, 0, 1769472, 0, 0, 1835008, 0, 0, 1900544, 0, 0, 1966080, 0, 0, 1, 0, 0, 65537, 0, 0, 131073, 0, 0, 196609, 0, 0, 262145, 0, 0, 327681, 0, 0, 393217, 0, 0, 458753, 0, 0, 524289, 0, 0, 589825, 0, 0, 655361, 0, 0, 720897, 0, 0, 786433, 0, 0, 851969, 0, 0, 917505, 0, 0, 983041, 0, 0, 1048577, 0, 0, 1114113, 0, 0, 1179649, 0, 0, 1245185, 0, 0, 1310721, 0, 0, 1376257, 0, 0, 1441793, 0, 0, 1507329, 0, 0, 1572865, 0, 0, 1638401, 0, 0, 1703937, 0, 0, 1769473, 0, 0, 1835009, 0, 0, 1900545, 0, 0, 1966081, 0, 0, 2, 0, 0, 65538, 0, 0, 1900546, 0, 0, 1966082, 0, 0, 3, 0, 0, 65539, 0, 0, 1900547, 0, 0, 1966083, 0, 0, 4, 0, 0, 65540, 0, 0, 1835012, 0, 0, 1900548, 0, 0, 1966084, 0, 0, 5, 0, 0, 65541, 0, 0, 327685, 0, 0, 1900549, 0, 0, 1966085, 0, 0, 6, 0, 0, 65542, 0, 0, 327686, 0, 0, 589830, 0, 0, 1179654, 0, 0, 1900550, 0, 0, 1966086, 0, 0, 7, 0, 0, 65543, 0, 0, 327687, 0, 0, 589831, 0, 0, 1179655, 0, 0, 1900551, 0, 0, 1966087, 0, 0, 8, 0, 0, 65544, 0, 0, 327688, 0, 0, 589832, 0, 0, 1179656, 0, 0, 1900552, 0, 0, 1966088, 0, 0, 9, 0, 0, 65545, 0, 0, 327689, 0, 0, 589833, 0, 0, 1900553, 0, 0, 1966089, 0, 0, 10, 0, 0, 65546, 0, 0, 327690, 0, 0, 589834, 0, 0, 1769482, 0, 0, 1835018, 0, 0, 1900554, 0, 0, 1966090, 0, 0, 11, 0, 0, 65547, 0, 0, 327691, 0, 0, 1769483, 0, 0, 1835019, 0, 0, 1900555, 0, 0, 1966091, 0, 0, 12, 0, 0, 65548, 0, 0, 327692, 0, 0, 1703948, 0, 0, 1900556, 0, 0, 1966092, 0, 0, 13, 0, 0, 65549, 0, 0, 327693, 0, 0, 1638413, 0, 0, 1900557, 0, 0, 1966093, 0, 0, 14, 0, 0, 65550, 0, 0, 1900558, 0, 0, 1966094, 0, 0, 15, 0, 0, 65551, 0, 0, 1900559, 0, 0, 1966095, 0, 0, 16, 0, 0, 65552, 0, 0, 1900560, 0, 0, 1966096, 0, 0, 17, 0, 0, 65553, 0, 0, 327697, 0, 0, 1900561, 0, 0, 1966097, 0, 0, 18, 0, 0, 65554, 0, 0, 1900562, 0, 0, 1966098, 0, 0, 19, 0, 0, 65555, 0, 0, 1900563, 0, 0, 1966099, 0, 0, 20, 0, 0, 65556, 0, 0, 1245204, 0, 0, 1900564, 0, 0, 1966100, 0, 0, 21, 0, 0, 65557, 0, 0, 393237, 0, 0, 589845, 0, 0, 1245205, 0, 0, 1900565, 0, 0, 1966101, 0, 0, 22, 0, 0, 65558, 0, 0, 393238, 0, 0, 589846, 0, 0, 1245206, 0, 0, 1900566, 0, 0, 1966102, 0, 0, 23, 0, 0, 65559, 0, 0, 589847, 0, 0, 1245207, 0, 0, 1900567, 0, 0, 1966103, 0, 0, 24, 0, 0, 65560, 0, 0, 1900568, 0, 0, 1966104, 0, 0, 25, 0, 0, 65561, 0, 0, 524313, 0, 0, 1638425, 0, 0, 1900569, 0, 0, 1966105, 0, 0, 26, 0, 0, 65562, 0, 0, 524314, 0, 0, 1638426, 0, 0, 1835034, 0, 0, 1900570, 0, 0, 1966106, 0, 0, 27, 0, 0, 65563, 0, 0, 1507355, 0, 0, 1835035, 0, 0, 1900571, 0, 0, 1966107, 0, 0, 28, 0, 0, 65564, 0, 0, 1507356, 0, 0, 1769500, 0, 0, 1900572, 0, 0, 1966108, 0, 0, 29, 0, 0, 65565, 0, 0, 1376285, 0, 0, 1703965, 0, 0, 1769501, 0, 0, 1900573, 0, 0, 1966109, 0, 0, 30, 0, 0, 65566, 0, 0, 1376286, 0, 0, 1703966, 0, 0, 1900574, 0, 0, 1966110, 0, 0, 31, 0, 0, 65567, 0, 0, 131103, 0, 0, 196639, 0, 0, 262175, 0, 0, 327711, 0, 0, 393247, 0, 0, 458783, 0, 0, 524319, 0, 0, 589855, 0, 0, 655391, 0, 0, 720927, 0, 0, 786463, 0, 0, 851999, 0, 0, 917535, 0, 0, 983071, 0, 0, 1048607, 0, 0, 1114143, 0, 0, 1179679, 0, 0, 1245215, 0, 0, 1310751, 0, 0, 1376287, 0, 0, 1441823, 0, 0, 1507359, 0, 0, 1572895, 0, 0, 1638431, 0, 0, 1703967, 0, 0, 1769503, 0, 0, 1835039, 0, 0, 1900575, 0, 0, 1966111, 0, 0, 32, 0, 0, 65568, 0, 0, 131104, 0, 0, 196640, 0, 0, 262176, 0, 0, 327712, 0, 0, 393248, 0, 0, 458784, 0, 0, 524320, 0, 0, 589856, 0, 0, 655392, 0, 0, 720928, 0, 0, 786464, 0, 0, 852000, 0, 0, 917536, 0, 0, 983072, 0, 0, 1048608, 0, 0, 1114144, 0, 0, 1179680, 0, 0, 1245216, 0, 0, 1310752, 0, 0, 1376288, 0, 0, 1441824, 0, 0, 1507360, 0, 0, 1572896, 0, 0, 1638432, 0, 0, 1703968, 0, 0, 1769504, 0, 0, 1835040, 0, 0, 1900576, 0, 0, 1966112, 0, 0)
  110. [node name="MovingPlatform1" type="CharacterBody2D" parent="."]
  111. position = Vector2(268.651, 152)
  112. [node name="Collision" type="CollisionShape2D" parent="MovingPlatform1"]
  113. shape = SubResource("3")
  114. [node name="Sprite2D" type="Sprite2D" parent="MovingPlatform1"]
  115. modulate = Color(0.4, 2, 0.8, 1)
  116. texture = ExtResource("2")
  117. [node name="AnimationPlayer" type="AnimationPlayer" parent="MovingPlatform1"]
  118. autoplay = "leftright"
  119. playback_process_mode = 0
  120. libraries = {
  121. "": SubResource("AnimationLibrary_2v3oa")
  122. }
  123. [node name="MovingPlatform2" type="CharacterBody2D" parent="."]
  124. position = Vector2(88.3493, 152)
  125. [node name="Collision" type="CollisionShape2D" parent="MovingPlatform2"]
  126. shape = SubResource("3")
  127. [node name="Sprite2D" type="Sprite2D" parent="MovingPlatform2"]
  128. modulate = Color(0.4, 2, 0.8, 1)
  129. texture = ExtResource("2")
  130. [node name="AnimationPlayer" type="AnimationPlayer" parent="MovingPlatform2"]
  131. autoplay = "updown"
  132. playback_process_mode = 0
  133. libraries = {
  134. "": SubResource("AnimationLibrary_j555p")
  135. }
  136. [node name="Princess" type="Area2D" parent="."]
  137. position = Vector2(97, 72)
  138. script = ExtResource("7")
  139. [node name="Collision" type="CollisionShape2D" parent="Princess"]
  140. shape = SubResource("7")
  141. [node name="Sprite2D" type="Sprite2D" parent="Princess"]
  142. texture = ExtResource("4")
  143. [node name="WinText" type="Label" parent="."]
  144. visible = false
  145. offset_left = 114.0
  146. offset_top = 30.0
  147. offset_right = 299.0
  148. offset_bottom = 82.0
  149. size_flags_horizontal = 2
  150. size_flags_vertical = 0
  151. text = "Thank You Cubio!
  152. You Saved The Princess!"
  153. [node name="OneWay1" type="CharacterBody2D" parent="."]
  154. position = Vector2(440, 308)
  155. [node name="Sprite2D" type="Sprite2D" parent="OneWay1"]
  156. scale = Vector2(1, 0.3)
  157. texture = ExtResource("2")
  158. [node name="CollisionShape2D" type="CollisionShape2D" parent="OneWay1"]
  159. shape = SubResource("8")
  160. one_way_collision = true
  161. [node name="OneWay2" type="CharacterBody2D" parent="."]
  162. position = Vector2(456, 308)
  163. [node name="Sprite2D" type="Sprite2D" parent="OneWay2"]
  164. scale = Vector2(1, 0.3)
  165. texture = ExtResource("2")
  166. [node name="CollisionShape2D" type="CollisionShape2D" parent="OneWay2"]
  167. shape = SubResource("8")
  168. one_way_collision = true
  169. [node name="OneWay3" type="CharacterBody2D" parent="."]
  170. position = Vector2(472, 308)
  171. [node name="Sprite2D" type="Sprite2D" parent="OneWay3"]
  172. scale = Vector2(1, 0.3)
  173. texture = ExtResource("2")
  174. [node name="CollisionShape2D" type="CollisionShape2D" parent="OneWay3"]
  175. shape = SubResource("8")
  176. one_way_collision = true
  177. [node name="OneWay4" type="CharacterBody2D" parent="."]
  178. position = Vector2(487, 308)
  179. [node name="Sprite2D" type="Sprite2D" parent="OneWay4"]
  180. scale = Vector2(1, 0.3)
  181. texture = ExtResource("2")
  182. [node name="CollisionShape2D" type="CollisionShape2D" parent="OneWay4"]
  183. shape = SubResource("8")
  184. one_way_collision = true
  185. [node name="Circle" type="CharacterBody2D" parent="."]
  186. position = Vector2(241.169, 304.126)
  187. rotation = -0.0790058
  188. [node name="Sprite2D" type="Sprite2D" parent="Circle"]
  189. modulate = Color(0.4, 2, 0.8, 1)
  190. texture = ExtResource("5")
  191. [node name="CollisionShape2D" type="CollisionShape2D" parent="Circle"]
  192. shape = SubResource("9")
  193. [node name="AnimationPlayer" type="AnimationPlayer" parent="Circle"]
  194. autoplay = "turn"
  195. libraries = {
  196. "": SubResource("AnimationLibrary_gijtf")
  197. }
  198. [node name="BoxSprite" type="Sprite2D" parent="Circle"]
  199. modulate = Color(0.4, 2, 0.8, 1)
  200. position = Vector2(-3.05176e-05, -37.4108)
  201. texture = ExtResource("2")
  202. [node name="Box" type="CollisionShape2D" parent="Circle"]
  203. position = Vector2(-0.440125, -37.0904)
  204. shape = SubResource("11")
  205. [node name="Platform" type="StaticBody2D" parent="."]
  206. position = Vector2(257, 393)
  207. rotation = -0.428054
  208. metadata/_edit_group_ = true
  209. [node name="Sprite2D" type="Sprite2D" parent="Platform"]
  210. texture = ExtResource("6")
  211. [node name="CollisionShape2D" type="CollisionShape2D" parent="Platform"]
  212. shape = SubResource("12")
  213. [node name="Platform1" type="StaticBody2D" parent="."]
  214. position = Vector2(369, 393)
  215. rotation = 0.471239
  216. metadata/_edit_group_ = true
  217. [node name="Sprite2D" type="Sprite2D" parent="Platform1"]
  218. texture = ExtResource("6")
  219. [node name="CollisionShape2D" type="CollisionShape2D" parent="Platform1"]
  220. shape = SubResource("12")
  221. [node name="Camera2D" type="Camera2D" parent="."]
  222. offset = Vector2(265, 247)
  223. [node name="Player" parent="." instance=ExtResource("3")]
  224. position = Vector2(233.06, 223.436)
  225. [connection signal="body_entered" from="Princess" to="Princess" method="_on_body_entered"]