player.tscn 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  1. [gd_scene load_steps=47 format=3 uid="uid://dob8a2h4f6gt8"]
  2. [ext_resource type="Texture2D" uid="uid://c40a533uqalcb" path="res://assets/characters/character_1.png" id="1_3vyb7"]
  3. [ext_resource type="Script" uid="uid://cr0rf00w5q53d" path="res://scripts/player.gd" id="1_g2els"]
  4. [ext_resource type="AudioStream" uid="uid://csvkvrv8ndh5x" path="res://assets/Audio/interact.mp3" id="3_dqkch"]
  5. [ext_resource type="AudioStream" uid="uid://bd650j6lpf34f" path="res://assets/Audio/Running.mp3" id="4_qlg0r"]
  6. [sub_resource type="AtlasTexture" id="AtlasTexture_g2els"]
  7. atlas = ExtResource("1_3vyb7")
  8. region = Rect2(0, 697, 48, 76)
  9. [sub_resource type="AtlasTexture" id="AtlasTexture_qhqgy"]
  10. atlas = ExtResource("1_3vyb7")
  11. region = Rect2(48, 697, 48, 76)
  12. [sub_resource type="AtlasTexture" id="AtlasTexture_dqkch"]
  13. atlas = ExtResource("1_3vyb7")
  14. region = Rect2(96, 697, 48, 76)
  15. [sub_resource type="AtlasTexture" id="AtlasTexture_qlg0r"]
  16. atlas = ExtResource("1_3vyb7")
  17. region = Rect2(144, 697, 48, 76)
  18. [sub_resource type="AtlasTexture" id="AtlasTexture_tuyoq"]
  19. atlas = ExtResource("1_3vyb7")
  20. region = Rect2(192, 697, 48, 76)
  21. [sub_resource type="AtlasTexture" id="AtlasTexture_fjrip"]
  22. atlas = ExtResource("1_3vyb7")
  23. region = Rect2(240, 697, 48, 76)
  24. [sub_resource type="AtlasTexture" id="AtlasTexture_smehm"]
  25. atlas = ExtResource("1_3vyb7")
  26. region = Rect2(288, 697, 48, 76)
  27. [sub_resource type="AtlasTexture" id="AtlasTexture_ur7pv"]
  28. atlas = ExtResource("1_3vyb7")
  29. region = Rect2(336, 697, 48, 76)
  30. [sub_resource type="AtlasTexture" id="AtlasTexture_y4r1p"]
  31. atlas = ExtResource("1_3vyb7")
  32. region = Rect2(384, 697, 48, 76)
  33. [sub_resource type="AtlasTexture" id="AtlasTexture_d2wvv"]
  34. atlas = ExtResource("1_3vyb7")
  35. region = Rect2(432, 697, 48, 76)
  36. [sub_resource type="AtlasTexture" id="AtlasTexture_3v2ag"]
  37. atlas = ExtResource("1_3vyb7")
  38. region = Rect2(480, 697, 48, 76)
  39. [sub_resource type="AtlasTexture" id="AtlasTexture_jej6c"]
  40. atlas = ExtResource("1_3vyb7")
  41. region = Rect2(528, 697, 48, 76)
  42. [sub_resource type="AtlasTexture" id="AtlasTexture_f1ej7"]
  43. atlas = ExtResource("1_3vyb7")
  44. region = Rect2(0, 24, 48, 76)
  45. [sub_resource type="AtlasTexture" id="AtlasTexture_oprun"]
  46. atlas = ExtResource("1_3vyb7")
  47. region = Rect2(48, 24, 48, 76)
  48. [sub_resource type="AtlasTexture" id="AtlasTexture_a8ls1"]
  49. atlas = ExtResource("1_3vyb7")
  50. region = Rect2(96, 24, 48, 76)
  51. [sub_resource type="AtlasTexture" id="AtlasTexture_qfm1y"]
  52. atlas = ExtResource("1_3vyb7")
  53. region = Rect2(144, 24, 48, 76)
  54. [sub_resource type="AtlasTexture" id="AtlasTexture_fulsm"]
  55. atlas = ExtResource("1_3vyb7")
  56. region = Rect2(864, 794, 48, 70)
  57. [sub_resource type="AtlasTexture" id="AtlasTexture_4r5pv"]
  58. atlas = ExtResource("1_3vyb7")
  59. region = Rect2(912, 794, 48, 70)
  60. [sub_resource type="AtlasTexture" id="AtlasTexture_60mlk"]
  61. atlas = ExtResource("1_3vyb7")
  62. region = Rect2(960, 794, 48, 70)
  63. [sub_resource type="AtlasTexture" id="AtlasTexture_i4ail"]
  64. atlas = ExtResource("1_3vyb7")
  65. region = Rect2(1008, 794, 48, 70)
  66. [sub_resource type="AtlasTexture" id="AtlasTexture_a38lo"]
  67. atlas = ExtResource("1_3vyb7")
  68. region = Rect2(1056, 794, 48, 70)
  69. [sub_resource type="AtlasTexture" id="AtlasTexture_4ni07"]
  70. atlas = ExtResource("1_3vyb7")
  71. region = Rect2(1104, 794, 48, 70)
  72. [sub_resource type="AtlasTexture" id="AtlasTexture_wqfne"]
  73. atlas = ExtResource("1_3vyb7")
  74. region = Rect2(576, 794, 48, 70)
  75. [sub_resource type="AtlasTexture" id="AtlasTexture_wnwbv"]
  76. atlas = ExtResource("1_3vyb7")
  77. region = Rect2(624, 794, 48, 70)
  78. [sub_resource type="AtlasTexture" id="AtlasTexture_gl8cc"]
  79. atlas = ExtResource("1_3vyb7")
  80. region = Rect2(672, 794, 48, 70)
  81. [sub_resource type="AtlasTexture" id="AtlasTexture_487ah"]
  82. atlas = ExtResource("1_3vyb7")
  83. region = Rect2(720, 794, 48, 70)
  84. [sub_resource type="AtlasTexture" id="AtlasTexture_md1ol"]
  85. atlas = ExtResource("1_3vyb7")
  86. region = Rect2(768, 794, 48, 70)
  87. [sub_resource type="AtlasTexture" id="AtlasTexture_bj30b"]
  88. atlas = ExtResource("1_3vyb7")
  89. region = Rect2(816, 794, 48, 70)
  90. [sub_resource type="AtlasTexture" id="AtlasTexture_jc3p3"]
  91. atlas = ExtResource("1_3vyb7")
  92. region = Rect2(0, 794, 48, 70)
  93. [sub_resource type="AtlasTexture" id="AtlasTexture_hax0n"]
  94. atlas = ExtResource("1_3vyb7")
  95. region = Rect2(48, 794, 48, 70)
  96. [sub_resource type="AtlasTexture" id="AtlasTexture_t4otl"]
  97. atlas = ExtResource("1_3vyb7")
  98. region = Rect2(96, 794, 48, 70)
  99. [sub_resource type="AtlasTexture" id="AtlasTexture_j2b1d"]
  100. atlas = ExtResource("1_3vyb7")
  101. region = Rect2(144, 794, 48, 70)
  102. [sub_resource type="AtlasTexture" id="AtlasTexture_cs1tg"]
  103. atlas = ExtResource("1_3vyb7")
  104. region = Rect2(192, 794, 48, 70)
  105. [sub_resource type="AtlasTexture" id="AtlasTexture_2dvfe"]
  106. atlas = ExtResource("1_3vyb7")
  107. region = Rect2(240, 794, 48, 70)
  108. [sub_resource type="AtlasTexture" id="AtlasTexture_l71n6"]
  109. atlas = ExtResource("1_3vyb7")
  110. region = Rect2(288, 794, 48, 70)
  111. [sub_resource type="AtlasTexture" id="AtlasTexture_ke2ow"]
  112. atlas = ExtResource("1_3vyb7")
  113. region = Rect2(336, 794, 48, 70)
  114. [sub_resource type="AtlasTexture" id="AtlasTexture_ujl30"]
  115. atlas = ExtResource("1_3vyb7")
  116. region = Rect2(384, 794, 48, 70)
  117. [sub_resource type="AtlasTexture" id="AtlasTexture_31cv2"]
  118. atlas = ExtResource("1_3vyb7")
  119. region = Rect2(432, 794, 48, 70)
  120. [sub_resource type="AtlasTexture" id="AtlasTexture_pf23h"]
  121. atlas = ExtResource("1_3vyb7")
  122. region = Rect2(480, 794, 48, 70)
  123. [sub_resource type="AtlasTexture" id="AtlasTexture_dt7fs"]
  124. atlas = ExtResource("1_3vyb7")
  125. region = Rect2(528, 794, 48, 70)
  126. [sub_resource type="SpriteFrames" id="SpriteFrames_fulsm"]
  127. animations = [{
  128. "frames": [{
  129. "duration": 1.0,
  130. "texture": SubResource("AtlasTexture_g2els")
  131. }, {
  132. "duration": 1.0,
  133. "texture": SubResource("AtlasTexture_qhqgy")
  134. }, {
  135. "duration": 1.0,
  136. "texture": SubResource("AtlasTexture_dqkch")
  137. }, {
  138. "duration": 1.0,
  139. "texture": SubResource("AtlasTexture_qlg0r")
  140. }, {
  141. "duration": 1.0,
  142. "texture": SubResource("AtlasTexture_tuyoq")
  143. }, {
  144. "duration": 1.0,
  145. "texture": SubResource("AtlasTexture_fjrip")
  146. }, {
  147. "duration": 1.0,
  148. "texture": SubResource("AtlasTexture_smehm")
  149. }, {
  150. "duration": 1.0,
  151. "texture": SubResource("AtlasTexture_ur7pv")
  152. }, {
  153. "duration": 1.0,
  154. "texture": SubResource("AtlasTexture_y4r1p")
  155. }, {
  156. "duration": 1.0,
  157. "texture": SubResource("AtlasTexture_d2wvv")
  158. }, {
  159. "duration": 1.0,
  160. "texture": SubResource("AtlasTexture_3v2ag")
  161. }, {
  162. "duration": 1.0,
  163. "texture": SubResource("AtlasTexture_jej6c")
  164. }],
  165. "loop": true,
  166. "name": &"idle",
  167. "speed": 12.0
  168. }, {
  169. "frames": [{
  170. "duration": 1.0,
  171. "texture": SubResource("AtlasTexture_f1ej7")
  172. }, {
  173. "duration": 1.0,
  174. "texture": SubResource("AtlasTexture_oprun")
  175. }, {
  176. "duration": 1.0,
  177. "texture": SubResource("AtlasTexture_a8ls1")
  178. }, {
  179. "duration": 1.0,
  180. "texture": SubResource("AtlasTexture_qfm1y")
  181. }],
  182. "loop": true,
  183. "name": &"turn",
  184. "speed": 5.0
  185. }, {
  186. "frames": [{
  187. "duration": 1.0,
  188. "texture": SubResource("AtlasTexture_fulsm")
  189. }, {
  190. "duration": 1.0,
  191. "texture": SubResource("AtlasTexture_4r5pv")
  192. }, {
  193. "duration": 1.0,
  194. "texture": SubResource("AtlasTexture_60mlk")
  195. }, {
  196. "duration": 1.0,
  197. "texture": SubResource("AtlasTexture_i4ail")
  198. }, {
  199. "duration": 1.0,
  200. "texture": SubResource("AtlasTexture_a38lo")
  201. }, {
  202. "duration": 1.0,
  203. "texture": SubResource("AtlasTexture_4ni07")
  204. }],
  205. "loop": true,
  206. "name": &"walk_down",
  207. "speed": 5.0
  208. }, {
  209. "frames": [{
  210. "duration": 1.0,
  211. "texture": SubResource("AtlasTexture_wqfne")
  212. }, {
  213. "duration": 1.0,
  214. "texture": SubResource("AtlasTexture_wnwbv")
  215. }, {
  216. "duration": 1.0,
  217. "texture": SubResource("AtlasTexture_gl8cc")
  218. }, {
  219. "duration": 1.0,
  220. "texture": SubResource("AtlasTexture_487ah")
  221. }, {
  222. "duration": 1.0,
  223. "texture": SubResource("AtlasTexture_md1ol")
  224. }, {
  225. "duration": 1.0,
  226. "texture": SubResource("AtlasTexture_bj30b")
  227. }],
  228. "loop": true,
  229. "name": &"walk_left",
  230. "speed": 5.0
  231. }, {
  232. "frames": [{
  233. "duration": 1.0,
  234. "texture": SubResource("AtlasTexture_jc3p3")
  235. }, {
  236. "duration": 1.0,
  237. "texture": SubResource("AtlasTexture_hax0n")
  238. }, {
  239. "duration": 1.0,
  240. "texture": SubResource("AtlasTexture_t4otl")
  241. }, {
  242. "duration": 1.0,
  243. "texture": SubResource("AtlasTexture_j2b1d")
  244. }, {
  245. "duration": 1.0,
  246. "texture": SubResource("AtlasTexture_cs1tg")
  247. }, {
  248. "duration": 1.0,
  249. "texture": SubResource("AtlasTexture_2dvfe")
  250. }],
  251. "loop": true,
  252. "name": &"walk_right",
  253. "speed": 5.0
  254. }, {
  255. "frames": [{
  256. "duration": 1.0,
  257. "texture": SubResource("AtlasTexture_l71n6")
  258. }, {
  259. "duration": 1.0,
  260. "texture": SubResource("AtlasTexture_ke2ow")
  261. }, {
  262. "duration": 1.0,
  263. "texture": SubResource("AtlasTexture_ujl30")
  264. }, {
  265. "duration": 1.0,
  266. "texture": SubResource("AtlasTexture_31cv2")
  267. }, {
  268. "duration": 1.0,
  269. "texture": SubResource("AtlasTexture_pf23h")
  270. }, {
  271. "duration": 1.0,
  272. "texture": SubResource("AtlasTexture_dt7fs")
  273. }],
  274. "loop": true,
  275. "name": &"walk_up",
  276. "speed": 12.0
  277. }]
  278. [sub_resource type="RectangleShape2D" id="RectangleShape2D_4r5pv"]
  279. size = Vector2(43, 68)
  280. [node name="Player" type="CharacterBody2D"]
  281. script = ExtResource("1_g2els")
  282. [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
  283. sprite_frames = SubResource("SpriteFrames_fulsm")
  284. animation = &"walk_right"
  285. autoplay = "idle"
  286. [node name="CollisionShape2D" type="CollisionShape2D" parent="."]
  287. position = Vector2(-0.5, -1)
  288. shape = SubResource("RectangleShape2D_4r5pv")
  289. [node name="Camera2D" type="Camera2D" parent="."]
  290. zoom = Vector2(1.5, 1.5)
  291. [node name="InteractSound" type="AudioStreamPlayer" parent="."]
  292. stream = ExtResource("3_dqkch")
  293. [node name="RunningSound" type="AudioStreamPlayer" parent="."]
  294. stream = ExtResource("4_qlg0r")