colworld.tscn 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. [gd_scene load_steps=19 format=2]
  2. [ext_resource path="res://colworld.gd" type="Script" id=1]
  3. [ext_resource path="res://obstacle.png" type="Texture" id=2]
  4. [ext_resource path="res://player.tscn" type="PackedScene" id=3]
  5. [ext_resource path="res://princess.png" type="Texture" id=4]
  6. [ext_resource path="res://circle.png" type="Texture" id=5]
  7. [ext_resource path="res://long_obstacle.png" type="Texture" id=6]
  8. [sub_resource type="RectangleShape2D" id=1]
  9. custom_solver_bias = 0.0
  10. extents = Vector2( 8, 8 )
  11. [sub_resource type="TileSet" id=2]
  12. 0/name = ""
  13. 0/texture = ExtResource( 2 )
  14. 0/tex_offset = Vector2( 0, 0 )
  15. 0/modulate = Color( 1, 1, 1, 1 )
  16. 0/region = Rect2( 0, 0, 0, 0 )
  17. 0/occluder_offset = Vector2( 0, 0 )
  18. 0/navigation_offset = Vector2( 0, 0 )
  19. 0/shapes = [ {
  20. "one_way": false,
  21. "shape": SubResource( 1 ),
  22. "shape_transform": Transform2D( 1, 0, 0, 1, 8, 8 )
  23. } ]
  24. [sub_resource type="RectangleShape2D" id=3]
  25. custom_solver_bias = 0.0
  26. extents = Vector2( 8, 8 )
  27. [sub_resource type="Animation" id=4]
  28. length = 10.0
  29. loop = true
  30. step = 0.1
  31. tracks/0/type = "value"
  32. tracks/0/path = NodePath(".:position")
  33. tracks/0/interp = 1
  34. tracks/0/loop_wrap = true
  35. tracks/0/imported = false
  36. tracks/0/keys = {
  37. "times": PoolRealArray( 0, 1, 5, 6 ),
  38. "transitions": PoolRealArray( 1, 1, 1, 1 ),
  39. "update": 0,
  40. "values": [ Vector2( 184, 152 ), Vector2( 184, 152 ), Vector2( 328.086, 152 ), Vector2( 328.086, 152 ) ]
  41. }
  42. [sub_resource type="Animation" id=5]
  43. resource_name = "leftright"
  44. length = 10.0
  45. loop = true
  46. step = 0.1
  47. tracks/0/type = "value"
  48. tracks/0/path = NodePath(".:position")
  49. tracks/0/interp = 1
  50. tracks/0/loop_wrap = true
  51. tracks/0/imported = false
  52. tracks/0/keys = {
  53. "times": PoolRealArray( 0, 1, 5, 6 ),
  54. "transitions": PoolRealArray( 1, 1, 1, 1 ),
  55. "update": 0,
  56. "values": [ Vector2( 184, 152 ), Vector2( 184, 152 ), Vector2( 328.086, 152 ), Vector2( 328.086, 152 ) ]
  57. }
  58. [sub_resource type="Animation" id=6]
  59. length = 10.0
  60. loop = true
  61. step = 0.1
  62. tracks/0/type = "value"
  63. tracks/0/path = NodePath(".:position")
  64. tracks/0/interp = 1
  65. tracks/0/loop_wrap = true
  66. tracks/0/imported = false
  67. tracks/0/keys = {
  68. "times": PoolRealArray( 0, 1, 5, 6 ),
  69. "transitions": PoolRealArray( 1, 1, 1, 1 ),
  70. "update": 0,
  71. "values": [ Vector2( 88.3493, 296 ), Vector2( 88.3493, 296 ), Vector2( 88.3493, 152 ), Vector2( 88.3493, 152 ) ]
  72. }
  73. [sub_resource type="RectangleShape2D" id=7]
  74. custom_solver_bias = 0.0
  75. extents = Vector2( 8, 8 )
  76. [sub_resource type="RectangleShape2D" id=8]
  77. custom_solver_bias = 0.0
  78. extents = Vector2( 10, 4 )
  79. [sub_resource type="CircleShape2D" id=9]
  80. custom_solver_bias = 0.0
  81. radius = 32.0
  82. [sub_resource type="Animation" id=10]
  83. length = 20.0
  84. loop = true
  85. step = 0.1
  86. tracks/0/type = "value"
  87. tracks/0/path = NodePath(".:rotation_degrees")
  88. tracks/0/interp = 1
  89. tracks/0/loop_wrap = true
  90. tracks/0/imported = false
  91. tracks/0/keys = {
  92. "times": PoolRealArray( 0, 5, 10, 15 ),
  93. "transitions": PoolRealArray( -2, -2, -2, -2 ),
  94. "update": 0,
  95. "values": [ 0.0, 90.0, 0.0, -90.0 ]
  96. }
  97. [sub_resource type="RectangleShape2D" id=11]
  98. custom_solver_bias = 0.0
  99. extents = Vector2( 8, 8 )
  100. [sub_resource type="RectangleShape2D" id=12]
  101. custom_solver_bias = 0.0
  102. extents = Vector2( 32, 8 )
  103. [node name="colworld" type="Node2D"]
  104. script = ExtResource( 1 )
  105. [node name="TileMap" type="TileMap" parent="."]
  106. mode = 0
  107. tile_set = SubResource( 2 )
  108. cell_size = Vector2( 16, 16 )
  109. cell_quadrant_size = 16
  110. cell_custom_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
  111. cell_half_offset = 2
  112. cell_tile_origin = 0
  113. cell_y_sort = false
  114. collision_use_kinematic = false
  115. collision_friction = 1.0
  116. collision_bounce = 0.0
  117. collision_layer = 1
  118. collision_mask = 1
  119. occluder_light_mask = 1
  120. tile_data = PoolIntArray( 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 0, 11, 0, 12, 0, 13, 0, 14, 0, 15, 0, 16, 0, 17, 0, 18, 0, 19, 0, 20, 0, 21, 0, 22, 0, 23, 0, 24, 0, 25, 0, 26, 0, 27, 0, 28, 0, 29, 0, 30, 0, 31, 0, 32, 0, 65536, 0, 65537, 0, 65538, 0, 65539, 0, 65540, 0, 65541, 0, 65542, 0, 65543, 0, 65544, 0, 65545, 0, 65546, 0, 65547, 0, 65548, 0, 65549, 0, 65550, 0, 65551, 0, 65552, 0, 65553, 0, 65554, 0, 65555, 0, 65556, 0, 65557, 0, 65558, 0, 65559, 0, 65560, 0, 65561, 0, 65562, 0, 65563, 0, 65564, 0, 65565, 0, 65566, 0, 65567, 0, 65568, 0, 131072, 0, 131073, 0, 131103, 0, 131104, 0, 196608, 0, 196609, 0, 196639, 0, 196640, 0, 262144, 0, 262145, 0, 262175, 0, 262176, 0, 327680, 0, 327681, 0, 327685, 0, 327686, 0, 327687, 0, 327688, 0, 327689, 0, 327690, 0, 327691, 0, 327692, 0, 327693, 0, 327697, 0, 327711, 0, 327712, 0, 393216, 0, 393217, 0, 393237, 0, 393238, 0, 393247, 0, 393248, 0, 458752, 0, 458753, 0, 458783, 0, 458784, 0, 524288, 0, 524289, 0, 524313, 0, 524314, 0, 524319, 0, 524320, 0, 589824, 0, 589825, 0, 589830, 0, 589831, 0, 589832, 0, 589833, 0, 589834, 0, 589845, 0, 589846, 0, 589847, 0, 589855, 0, 589856, 0, 655360, 0, 655361, 0, 655391, 0, 655392, 0, 720896, 0, 720897, 0, 720927, 0, 720928, 0, 786432, 0, 786433, 0, 786463, 0, 786464, 0, 851968, 0, 851969, 0, 851999, 0, 852000, 0, 917504, 0, 917505, 0, 917535, 0, 917536, 0, 983040, 0, 983041, 0, 983071, 0, 983072, 0, 1048576, 0, 1048577, 0, 1048607, 0, 1048608, 0, 1114112, 0, 1114113, 0, 1114143, 0, 1114144, 0, 1179648, 0, 1179649, 0, 1179654, 0, 1179655, 0, 1179656, 0, 1179679, 0, 1179680, 0, 1245184, 0, 1245185, 0, 1245204, 0, 1245205, 0, 1245206, 0, 1245207, 0, 1245215, 0, 1245216, 0, 1310720, 0, 1310721, 0, 1310751, 0, 1310752, 0, 1376256, 0, 1376257, 0, 1376285, 0, 1376286, 0, 1376287, 0, 1376288, 0, 1441792, 0, 1441793, 0, 1441823, 0, 1441824, 0, 1507328, 0, 1507329, 0, 1507355, 0, 1507356, 0, 1507359, 0, 1507360, 0, 1572864, 0, 1572865, 0, 1572895, 0, 1572896, 0, 1638400, 0, 1638401, 0, 1638413, 0, 1638425, 0, 1638426, 0, 1638431, 0, 1638432, 0, 1703936, 0, 1703937, 0, 1703948, 0, 1703965, 0, 1703966, 0, 1703967, 0, 1703968, 0, 1769472, 0, 1769473, 0, 1769482, 0, 1769483, 0, 1769500, 0, 1769501, 0, 1769503, 0, 1769504, 0, 1835008, 0, 1835009, 0, 1835012, 0, 1835018, 0, 1835019, 0, 1835034, 0, 1835035, 0, 1835039, 0, 1835040, 0, 1900544, 0, 1900545, 0, 1900546, 0, 1900547, 0, 1900548, 0, 1900549, 0, 1900550, 0, 1900551, 0, 1900552, 0, 1900553, 0, 1900554, 0, 1900555, 0, 1900556, 0, 1900557, 0, 1900558, 0, 1900559, 0, 1900560, 0, 1900561, 0, 1900562, 0, 1900563, 0, 1900564, 0, 1900565, 0, 1900566, 0, 1900567, 0, 1900568, 0, 1900569, 0, 1900570, 0, 1900571, 0, 1900572, 0, 1900573, 0, 1900574, 0, 1900575, 0, 1900576, 0, 1966080, 0, 1966081, 0, 1966082, 0, 1966083, 0, 1966084, 0, 1966085, 0, 1966086, 0, 1966087, 0, 1966088, 0, 1966089, 0, 1966090, 0, 1966091, 0, 1966092, 0, 1966093, 0, 1966094, 0, 1966095, 0, 1966096, 0, 1966097, 0, 1966098, 0, 1966099, 0, 1966100, 0, 1966101, 0, 1966102, 0, 1966103, 0, 1966104, 0, 1966105, 0, 1966106, 0, 1966107, 0, 1966108, 0, 1966109, 0, 1966110, 0, 1966111, 0, 1966112, 0, 2031616, 0, 2031617, 0, 2031618, 0, 2031619, 0, 2031620, 0, 2031621, 0, 2031622, 0, 2031623, 0, 2031624, 0, 2031625, 0, 2031626, 0, 2031627, 0, 2031628, 0, 2031629, 0, 2031630, 0, 2031631, 0, 2031632, 0, 2031633, 0, 2031634, 0, 2031635, 0, 2031636, 0, 2031637, 0, 2031638, 0, 2031639, 0, 2031640, 0, 2031641, 0, 2031642, 0, 2031643, 0, 2031644, 0, 2031645, 0, 2031646, 0, 2031647, 0, 2031648, 0 )
  121. [node name="player" parent="." instance=ExtResource( 3 )]
  122. position = Vector2( 233.06, 223.436 )
  123. [node name="moving_platform1" type="KinematicBody2D" parent="."]
  124. position = Vector2( 274.142, 152 )
  125. input_pickable = false
  126. collision_layer = 1
  127. collision_mask = 1
  128. collision/safe_margin = 0.08
  129. [node name="collision" type="CollisionShape2D" parent="moving_platform1"]
  130. shape = SubResource( 3 )
  131. [node name="sprite" type="Sprite" parent="moving_platform1"]
  132. texture = ExtResource( 2 )
  133. [node name="anim" type="AnimationPlayer" parent="moving_platform1"]
  134. playback_process_mode = 0
  135. playback_default_blend_time = 0.0
  136. root_node = NodePath("..")
  137. anims/leftright = SubResource( 4 )
  138. playback/active = true
  139. playback/speed = 1.0
  140. blend_times = [ ]
  141. autoplay = "leftright"
  142. [node name="moving_platform2" type="KinematicBody2D" parent="."]
  143. position = Vector2( 88.3493, 284.689 )
  144. input_pickable = false
  145. collision_layer = 1
  146. collision_mask = 1
  147. collision/safe_margin = 0.08
  148. [node name="collision" type="CollisionShape2D" parent="moving_platform2"]
  149. shape = SubResource( 3 )
  150. [node name="sprite" type="Sprite" parent="moving_platform2"]
  151. texture = ExtResource( 2 )
  152. [node name="anim" type="AnimationPlayer" parent="moving_platform2"]
  153. playback_process_mode = 0
  154. playback_default_blend_time = 0.0
  155. root_node = NodePath("..")
  156. anims/leftright = SubResource( 5 )
  157. anims/updown = SubResource( 6 )
  158. playback/active = true
  159. playback/speed = 1.0
  160. blend_times = [ ]
  161. autoplay = "updown"
  162. [node name="princess" type="Area2D" parent="."]
  163. position = Vector2( 97, 72 )
  164. input_pickable = true
  165. gravity_vec = Vector2( 0, 1 )
  166. gravity = 98.0
  167. linear_damp = 0.1
  168. angular_damp = 1.0
  169. audio_bus_override = false
  170. audio_bus_name = "Master"
  171. [node name="collision" type="CollisionShape2D" parent="princess"]
  172. shape = SubResource( 7 )
  173. [node name="Sprite" type="Sprite" parent="princess"]
  174. texture = ExtResource( 4 )
  175. [node name="youwin" type="Label" parent="."]
  176. visible = false
  177. anchor_left = 0.0
  178. anchor_top = 0.0
  179. anchor_right = 0.0
  180. anchor_bottom = 0.0
  181. margin_left = 196.0
  182. margin_top = 41.0
  183. margin_right = 344.0
  184. margin_bottom = 67.0
  185. rect_pivot_offset = Vector2( 0, 0 )
  186. rect_clip_content = false
  187. mouse_filter = 2
  188. size_flags_horizontal = 2
  189. size_flags_vertical = 0
  190. text = "Thank You Cubio
  191. You Saved The Princess!"
  192. align = 1
  193. percent_visible = 1.0
  194. lines_skipped = 0
  195. max_lines_visible = -1
  196. [node name="oneway1" type="KinematicBody2D" parent="."]
  197. position = Vector2( 439, 308 )
  198. input_pickable = false
  199. collision_layer = 1
  200. collision_mask = 1
  201. collision/safe_margin = 0.08
  202. [node name="sprite" type="Sprite" parent="oneway1"]
  203. scale = Vector2( 1, 0.3 )
  204. texture = ExtResource( 2 )
  205. [node name="CollisionShape2D" type="CollisionShape2D" parent="oneway1"]
  206. shape = SubResource( 8 )
  207. one_way_collision = true
  208. [node name="oneway2" type="KinematicBody2D" parent="."]
  209. position = Vector2( 456, 308 )
  210. input_pickable = false
  211. collision_layer = 1
  212. collision_mask = 1
  213. collision/safe_margin = 0.08
  214. [node name="sprite" type="Sprite" parent="oneway2"]
  215. scale = Vector2( 1, 0.3 )
  216. texture = ExtResource( 2 )
  217. [node name="CollisionShape2D" type="CollisionShape2D" parent="oneway2"]
  218. shape = SubResource( 8 )
  219. one_way_collision = true
  220. [node name="oneway3" type="KinematicBody2D" parent="."]
  221. position = Vector2( 472, 308 )
  222. input_pickable = false
  223. collision_layer = 1
  224. collision_mask = 1
  225. collision/safe_margin = 0.08
  226. [node name="sprite" type="Sprite" parent="oneway3"]
  227. scale = Vector2( 1, 0.3 )
  228. texture = ExtResource( 2 )
  229. [node name="CollisionShape2D" type="CollisionShape2D" parent="oneway3"]
  230. shape = SubResource( 8 )
  231. one_way_collision = true
  232. [node name="oneway4" type="KinematicBody2D" parent="."]
  233. position = Vector2( 487, 308 )
  234. input_pickable = false
  235. collision_layer = 1
  236. collision_mask = 1
  237. collision/safe_margin = 0.08
  238. [node name="sprite" type="Sprite" parent="oneway4"]
  239. scale = Vector2( 1, 0.3 )
  240. texture = ExtResource( 2 )
  241. [node name="CollisionShape2D" type="CollisionShape2D" parent="oneway4"]
  242. shape = SubResource( 8 )
  243. one_way_collision = true
  244. [node name="circle" type="KinematicBody2D" parent="."]
  245. position = Vector2( 241.169, 304.126 )
  246. input_pickable = false
  247. collision_layer = 1
  248. collision_mask = 1
  249. collision/safe_margin = 0.08
  250. [node name="sprite" type="Sprite" parent="circle"]
  251. texture = ExtResource( 5 )
  252. [node name="CollisionShape2D" type="CollisionShape2D" parent="circle"]
  253. shape = SubResource( 9 )
  254. [node name="anim" type="AnimationPlayer" parent="circle"]
  255. playback_process_mode = 1
  256. playback_default_blend_time = 0.0
  257. root_node = NodePath("..")
  258. anims/turn = SubResource( 10 )
  259. playback/active = true
  260. playback/speed = 1.0
  261. blend_times = [ ]
  262. autoplay = "turn"
  263. [node name="box" type="CollisionShape2D" parent="circle"]
  264. position = Vector2( -0.440125, -37.0904 )
  265. shape = SubResource( 11 )
  266. [node name="boxsprite" type="Sprite" parent="circle"]
  267. position = Vector2( 0, -37.4108 )
  268. texture = ExtResource( 2 )
  269. [node name="platform" type="StaticBody2D" parent="."]
  270. position = Vector2( 251.44, 396.557 )
  271. rotation = -0.428054
  272. input_pickable = false
  273. collision_layer = 1
  274. collision_mask = 1
  275. constant_linear_velocity = Vector2( 0, 0 )
  276. constant_angular_velocity = 0.0
  277. friction = 1.0
  278. bounce = 0.0
  279. [node name="sprite" type="Sprite" parent="platform"]
  280. texture = ExtResource( 6 )
  281. [node name="CollisionShape2D" type="CollisionShape2D" parent="platform"]
  282. shape = SubResource( 12 )
  283. [node name="platform1" type="StaticBody2D" parent="."]
  284. position = Vector2( 369.116, 394.016 )
  285. rotation = 0.465931
  286. input_pickable = false
  287. collision_layer = 1
  288. collision_mask = 1
  289. constant_linear_velocity = Vector2( 0, 0 )
  290. constant_angular_velocity = 0.0
  291. friction = 1.0
  292. bounce = 0.0
  293. [node name="sprite" type="Sprite" parent="platform1"]
  294. texture = ExtResource( 6 )
  295. [node name="CollisionShape2D" type="CollisionShape2D" parent="platform1"]
  296. shape = SubResource( 12 )
  297. [connection signal="body_entered" from="princess" to="." method="_on_princess_body_enter"]