TheOutOfCity.tscn 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426
  1. [gd_scene load_steps=30 format=2]
  2. [ext_resource path="res://scripts/Player.gd" type="Script" id=1]
  3. [ext_resource path="res://assets/Player/AssetPLayerArrat1.png" type="Texture" id=2]
  4. [ext_resource path="res://assets/Player/AssetPLayerArratprisel2_2.png" type="Texture" id=3]
  5. [ext_resource path="res://assets/Player/AssetPLayerArratprisel3_2.png" type="Texture" id=4]
  6. [ext_resource path="res://assets/Player/AssetPLayerArrat2.png" type="Texture" id=5]
  7. [ext_resource path="res://assets/Player/AssetPLayerArrat3.png" type="Texture" id=6]
  8. [ext_resource path="res://assets/Player/AssetPLayerArratprisel1_2.png" type="Texture" id=7]
  9. [ext_resource path="res://assets/Player/AssetPLayerArrat4.png" type="Texture" id=8]
  10. [ext_resource path="res://scripts/Save.gd" type="Script" id=9]
  11. [ext_resource path="res://assets/GUI/HP_Bar/HP_Bar.tscn" type="PackedScene" id=10]
  12. [ext_resource path="res://addons/escape/Escape.tscn" type="PackedScene" id=11]
  13. [ext_resource path="res://assets/Tests/texture_01.png" type="Texture" id=12]
  14. [ext_resource path="res://scripts/Trigger.gd" type="Script" id=13]
  15. [ext_resource path="res://assets/Barrel/barrel.png" type="Texture" id=14]
  16. [ext_resource path="res://assets/Water/Water_Body.tscn" type="PackedScene" id=15]
  17. [sub_resource type="RectangleShape2D" id=1]
  18. extents = Vector2( 522.186, 12.9403 )
  19. [sub_resource type="RectangleShape2D" id=2]
  20. extents = Vector2( 10, 233.152 )
  21. [sub_resource type="PhysicsMaterial" id=3]
  22. [sub_resource type="RectangleShape2D" id=4]
  23. extents = Vector2( 30.8372, 43.0542 )
  24. [sub_resource type="Animation" id=5]
  25. resource_name = "Idle"
  26. length = 8.0
  27. loop = true
  28. tracks/0/type = "value"
  29. tracks/0/path = NodePath(".:linear_velocity")
  30. tracks/0/interp = 1
  31. tracks/0/loop_wrap = true
  32. tracks/0/imported = false
  33. tracks/0/enabled = true
  34. tracks/0/keys = {
  35. "times": PoolRealArray( 0 ),
  36. "transitions": PoolRealArray( 1 ),
  37. "update": 0,
  38. "values": [ Vector2( 0, -50 ) ]
  39. }
  40. [sub_resource type="RectangleShape2D" id=6]
  41. extents = Vector2( 388.762, 150.746 )
  42. [sub_resource type="RectangleShape2D" id=7]
  43. extents = Vector2( 18.8725, 18.7813 )
  44. [sub_resource type="RectangleShape2D" id=8]
  45. extents = Vector2( 18.8592, 23.0553 )
  46. [sub_resource type="SpriteFrames" id=9]
  47. animations = [ {
  48. "frames": [ ExtResource( 2 ) ],
  49. "loop": true,
  50. "name": "posible",
  51. "speed": 5.0
  52. }, {
  53. "frames": [ ExtResource( 8 ) ],
  54. "loop": true,
  55. "name": "jump",
  56. "speed": 5.0
  57. }, {
  58. "frames": [ ExtResource( 7 ), ExtResource( 3 ), ExtResource( 4 ) ],
  59. "loop": true,
  60. "name": "SquatAction",
  61. "speed": 5.0
  62. }, {
  63. "frames": [ ExtResource( 2 ), ExtResource( 8 ) ],
  64. "loop": true,
  65. "name": "Idle",
  66. "speed": 5.0
  67. }, {
  68. "frames": [ ExtResource( 7 ) ],
  69. "loop": true,
  70. "name": "SquatIdle",
  71. "speed": 5.0
  72. }, {
  73. "frames": [ ExtResource( 5 ), ExtResource( 6 ) ],
  74. "loop": true,
  75. "name": "Walk",
  76. "speed": 4.0
  77. } ]
  78. [sub_resource type="RectangleShape2D" id=10]
  79. extents = Vector2( 267.176, 41.9006 )
  80. [sub_resource type="RectangleShape2D" id=11]
  81. extents = Vector2( 269.676, 10 )
  82. [sub_resource type="RectangleShape2D" id=12]
  83. extents = Vector2( 244.463, 10 )
  84. [sub_resource type="Animation" id=13]
  85. resource_name = "Motion"
  86. length = 2.0
  87. loop = true
  88. tracks/0/type = "value"
  89. tracks/0/path = NodePath(".:position")
  90. tracks/0/interp = 1
  91. tracks/0/loop_wrap = true
  92. tracks/0/imported = false
  93. tracks/0/enabled = true
  94. tracks/0/keys = {
  95. "times": PoolRealArray( 1, 2 ),
  96. "transitions": PoolRealArray( 1, 1 ),
  97. "update": 0,
  98. "values": [ Vector2( -1.98682, -17.7002 ), Vector2( -1.98682, 5.2998 ) ]
  99. }
  100. tracks/1/type = "value"
  101. tracks/1/path = NodePath(".:rotation_degrees")
  102. tracks/1/interp = 1
  103. tracks/1/loop_wrap = true
  104. tracks/1/imported = false
  105. tracks/1/enabled = false
  106. tracks/1/keys = {
  107. "times": PoolRealArray( 0, 1, 2 ),
  108. "transitions": PoolRealArray( 1, 1, 1 ),
  109. "update": 0,
  110. "values": [ -180.0, -180.0, -178.0 ]
  111. }
  112. [sub_resource type="RectangleShape2D" id=14]
  113. extents = Vector2( 5.75348, 10 )
  114. [node name="The Out Of City" type="Node2D"]
  115. [node name="ScreenBorders" type="Node2D" parent="."]
  116. position = Vector2( 502.356, -12.157 )
  117. scale = Vector2( 1.9, 1.9 )
  118. [node name="StaticBody2D" type="StaticBody2D" parent="ScreenBorders"]
  119. [node name="UpBorder" type="CollisionShape2D" parent="ScreenBorders/StaticBody2D"]
  120. position = Vector2( 230.991, -3.94016 )
  121. shape = SubResource( 1 )
  122. [node name="RightBorder" type="CollisionShape2D" parent="ScreenBorders/StaticBody2D"]
  123. position = Vector2( 755.258, 230.798 )
  124. shape = SubResource( 2 )
  125. [node name="LeftBorder" type="CollisionShape2D" parent="ScreenBorders/StaticBody2D"]
  126. position = Vector2( -275.212, 236.626 )
  127. shape = SubResource( 2 )
  128. [node name="Position2D" type="Position2D" parent="."]
  129. visible = false
  130. position = Vector2( 779.193, 828.665 )
  131. [node name="Barrel" type="RigidBody2D" parent="." groups=[
  132. "bodies",
  133. ]]
  134. position = Vector2( 619.245, 777.62 )
  135. rotation = -0.00235736
  136. z_as_relative = false
  137. physics_material_override = SubResource( 3 )
  138. gravity_scale = 30.0
  139. angular_damp = 0.0
  140. [node name="barrel" type="Sprite" parent="Barrel"]
  141. position = Vector2( -0.390476, -43.874 )
  142. scale = Vector2( 6.84034, 6.15798 )
  143. texture = ExtResource( 14 )
  144. [node name="Collision" type="CollisionShape2D" parent="Barrel"]
  145. position = Vector2( -0.464355, -43.8525 )
  146. shape = SubResource( 4 )
  147. [node name="Animation" type="AnimationPlayer" parent="Barrel"]
  148. anims/Idle = SubResource( 5 )
  149. [node name="Barrel2" type="RigidBody2D" parent="." groups=[
  150. "bodies",
  151. ]]
  152. position = Vector2( 409.95, 776.879 )
  153. z_as_relative = false
  154. mass = 0.510204
  155. physics_material_override = SubResource( 3 )
  156. gravity_scale = 25.0
  157. linear_damp = 0.0
  158. angular_damp = 0.0
  159. [node name="barrel" type="Sprite" parent="Barrel2"]
  160. position = Vector2( -0.390476, -43.874 )
  161. scale = Vector2( 6.84034, 6.15798 )
  162. texture = ExtResource( 14 )
  163. [node name="Collision" type="CollisionShape2D" parent="Barrel2"]
  164. position = Vector2( -0.464355, -43.8525 )
  165. shape = SubResource( 4 )
  166. [node name="Barrel3" type="RigidBody2D" parent="." groups=[
  167. "bodies",
  168. ]]
  169. position = Vector2( 294.95, 779.879 )
  170. z_as_relative = false
  171. mass = 0.510204
  172. physics_material_override = SubResource( 3 )
  173. gravity_scale = 25.0
  174. linear_damp = 0.0
  175. angular_damp = 0.0
  176. [node name="barrel" type="Sprite" parent="Barrel3"]
  177. position = Vector2( -0.390476, -43.874 )
  178. scale = Vector2( 6.84034, 6.15798 )
  179. texture = ExtResource( 14 )
  180. [node name="Collision" type="CollisionShape2D" parent="Barrel3"]
  181. position = Vector2( -0.464355, -43.8525 )
  182. shape = SubResource( 4 )
  183. [node name="Water_Body" parent="." instance=ExtResource( 15 )]
  184. position = Vector2( 780.072, 817.138 )
  185. k = 0.03
  186. d = 0.3
  187. spread = 0.001
  188. spring_number = 40
  189. [node name="LeftBlock" type="StaticBody2D" parent="."]
  190. position = Vector2( 17.818, 0 )
  191. [node name="Collision2" type="CollisionShape2D" parent="LeftBlock"]
  192. position = Vector2( 368.589, 931.971 )
  193. shape = SubResource( 6 )
  194. [node name="texture" type="Sprite" parent="LeftBlock"]
  195. position = Vector2( 372.813, 929.282 )
  196. scale = Vector2( 0.758553, 0.289136 )
  197. texture = ExtResource( 12 )
  198. [node name="RightBlock" type="StaticBody2D" parent="."]
  199. position = Vector2( -1, 3 )
  200. [node name="Collision" type="CollisionShape2D" parent="RightBlock"]
  201. position = Vector2( 1617.94, 929.282 )
  202. scale = Vector2( 0.8, 1 )
  203. shape = SubResource( 6 )
  204. [node name="texture2" type="Sprite" parent="RightBlock"]
  205. position = Vector2( 1613.43, 929.282 )
  206. scale = Vector2( 0.602197, 0.295713 )
  207. texture = ExtResource( 12 )
  208. [node name="Player" type="KinematicBody2D" parent="."]
  209. position = Vector2( 46.5806, 650.409 )
  210. script = ExtResource( 1 )
  211. [node name="CollisionSit" type="CollisionShape2D" parent="Player"]
  212. visible = false
  213. position = Vector2( 72.172, 74.1736 )
  214. scale = Vector2( 1.9, 1.9 )
  215. shape = SubResource( 7 )
  216. disabled = true
  217. [node name="Collision" type="CollisionShape2D" parent="Player"]
  218. position = Vector2( 72.2378, 66.2825 )
  219. scale = Vector2( 1.9, 1.9 )
  220. shape = SubResource( 8 )
  221. [node name="AnimatedSprite" type="AnimatedSprite" parent="Player"]
  222. position = Vector2( 60.3159, 62.2558 )
  223. scale = Vector2( 7.961, 7.961 )
  224. frames = SubResource( 9 )
  225. animation = "Idle"
  226. [node name="GunPosition" type="Position2D" parent="Player"]
  227. position = Vector2( 86.8501, 67.1099 )
  228. [node name="Camera2D" type="Camera2D" parent="Player"]
  229. position = Vector2( 448.243, 49.4844 )
  230. scale = Vector2( 0.9, 0.5 )
  231. current = true
  232. limit_left = 0
  233. limit_top = 0
  234. limit_right = 1920
  235. limit_bottom = 1080
  236. smoothing_enabled = true
  237. [node name="RunTimer" type="Timer" parent="Player"]
  238. autostart = true
  239. [node name="RecoveryPower" type="Timer" parent="Player"]
  240. wait_time = 5.0
  241. [node name="HP_Bar" parent="." instance=ExtResource( 10 )]
  242. [node name="Escape" parent="." instance=ExtResource( 11 )]
  243. position = Vector2( 1.33099, -0.184305 )
  244. [node name="TimeMachine" type="Node2D" parent="."]
  245. script = ExtResource( 9 )
  246. [node name="Trigger" type="Area2D" parent="."]
  247. position = Vector2( 1046.71, 915.6 )
  248. rotation = -3.14159
  249. script = ExtResource( 13 )
  250. [node name="CollisionShape2D" type="CollisionShape2D" parent="Trigger"]
  251. position = Vector2( 1.70343, -60.657 )
  252. shape = SubResource( 10 )
  253. [node name="StaticBody2D" type="StaticBody2D" parent="."]
  254. position = Vector2( 1045.71, 782.6 )
  255. [node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
  256. position = Vector2( -8.72156, 252.323 )
  257. shape = SubResource( 11 )
  258. [node name="CollisionShape2D2" type="CollisionShape2D" parent="StaticBody2D"]
  259. position = Vector2( -1.98682, 5.2998 )
  260. rotation = -3.14159
  261. shape = SubResource( 12 )
  262. one_way_collision = true
  263. [node name="AnimationPlayer" type="AnimationPlayer" parent="StaticBody2D/CollisionShape2D2"]
  264. anims/Motion = SubResource( 13 )
  265. [node name="Border" type="StaticBody2D" parent="StaticBody2D/CollisionShape2D2"]
  266. visible = false
  267. position = Vector2( 1043.72, 792.9 )
  268. rotation = 3.14159
  269. [node name="CollisionShape2D3" type="CollisionShape2D" parent="StaticBody2D/CollisionShape2D2/Border"]
  270. position = Vector2( 812.828, 798.062 )
  271. rotation = -3.14159
  272. shape = SubResource( 14 )
  273. one_way_collision = true
  274. [node name="CollisionShape2D7" type="CollisionShape2D" parent="StaticBody2D/CollisionShape2D2/Border"]
  275. position = Vector2( 922.828, 798.062 )
  276. rotation = -3.14159
  277. shape = SubResource( 14 )
  278. one_way_collision = true
  279. [node name="CollisionShape2D9" type="CollisionShape2D" parent="StaticBody2D/CollisionShape2D2/Border"]
  280. position = Vector2( 978.828, 798.062 )
  281. rotation = -3.14159
  282. shape = SubResource( 14 )
  283. one_way_collision = true
  284. [node name="CollisionShape2D11" type="CollisionShape2D" parent="StaticBody2D/CollisionShape2D2/Border"]
  285. position = Vector2( 1029.83, 798.062 )
  286. rotation = -3.14159
  287. shape = SubResource( 14 )
  288. one_way_collision = true
  289. [node name="CollisionShape2D13" type="CollisionShape2D" parent="StaticBody2D/CollisionShape2D2/Border"]
  290. position = Vector2( 1085.83, 798.062 )
  291. rotation = -3.14159
  292. shape = SubResource( 14 )
  293. one_way_collision = true
  294. [node name="CollisionShape2D14" type="CollisionShape2D" parent="StaticBody2D/CollisionShape2D2/Border"]
  295. position = Vector2( 1115.83, 798.062 )
  296. rotation = -3.14159
  297. shape = SubResource( 14 )
  298. one_way_collision = true
  299. [node name="CollisionShape2D15" type="CollisionShape2D" parent="StaticBody2D/CollisionShape2D2/Border"]
  300. position = Vector2( 1137.83, 798.062 )
  301. rotation = -3.14159
  302. shape = SubResource( 14 )
  303. one_way_collision = true
  304. [node name="CollisionShape2D16" type="CollisionShape2D" parent="StaticBody2D/CollisionShape2D2/Border"]
  305. position = Vector2( 1166.83, 798.062 )
  306. rotation = -3.14159
  307. shape = SubResource( 14 )
  308. one_way_collision = true
  309. [node name="CollisionShape2D17" type="CollisionShape2D" parent="StaticBody2D/CollisionShape2D2/Border"]
  310. position = Vector2( 1193.83, 798.062 )
  311. rotation = -3.14159
  312. shape = SubResource( 14 )
  313. one_way_collision = true
  314. [node name="CollisionShape2D18" type="CollisionShape2D" parent="StaticBody2D/CollisionShape2D2/Border"]
  315. position = Vector2( 1223.83, 798.062 )
  316. rotation = -3.14159
  317. shape = SubResource( 14 )
  318. one_way_collision = true
  319. [node name="CollisionShape2D4" type="CollisionShape2D" parent="StaticBody2D/CollisionShape2D2/Border"]
  320. position = Vector2( 841.828, 798.062 )
  321. rotation = -3.14159
  322. shape = SubResource( 14 )
  323. one_way_collision = true
  324. [node name="CollisionShape2D5" type="CollisionShape2D" parent="StaticBody2D/CollisionShape2D2/Border"]
  325. position = Vector2( 868.828, 798.062 )
  326. rotation = -3.14159
  327. shape = SubResource( 14 )
  328. one_way_collision = true
  329. [node name="CollisionShape2D6" type="CollisionShape2D" parent="StaticBody2D/CollisionShape2D2/Border"]
  330. position = Vector2( 898.828, 798.062 )
  331. rotation = -3.14159
  332. shape = SubResource( 14 )
  333. one_way_collision = true
  334. [node name="CollisionShape2D8" type="CollisionShape2D" parent="StaticBody2D/CollisionShape2D2/Border"]
  335. position = Vector2( 951.828, 798.062 )
  336. rotation = -3.14159
  337. shape = SubResource( 14 )
  338. one_way_collision = true
  339. [node name="CollisionShape2D10" type="CollisionShape2D" parent="StaticBody2D/CollisionShape2D2/Border"]
  340. position = Vector2( 1008.83, 798.062 )
  341. rotation = -3.14159
  342. shape = SubResource( 14 )
  343. one_way_collision = true
  344. [node name="CollisionShape2D12" type="CollisionShape2D" parent="StaticBody2D/CollisionShape2D2/Border"]
  345. position = Vector2( 1058.83, 798.062 )
  346. rotation = -3.14159
  347. shape = SubResource( 14 )
  348. one_way_collision = true
  349. [connection signal="timeout" from="Player/RunTimer" to="Player" method="_on_RunTimer_timeout"]
  350. [connection signal="timeout" from="Player/RecoveryPower" to="Player" method="_on_RecoveryPower_timeout"]
  351. [connection signal="body_entered" from="Trigger" to="Trigger" method="_on_Trigger_body_entered"]