player.tscn 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. [gd_scene load_steps=18 format=3 uid="uid://dt5uhvofl318g"]
  2. [ext_resource type="Script" path="res://scenes/player/player.gd" id="1_mu74c"]
  3. [ext_resource type="Texture2D" uid="uid://dgd7foy2lynlw" path="res://sprites/player.png" id="2_js4dt"]
  4. [sub_resource type="Animation" id="Animation_hjp2n"]
  5. length = 0.001
  6. tracks/0/type = "value"
  7. tracks/0/imported = false
  8. tracks/0/enabled = true
  9. tracks/0/path = NodePath("Sprite2D:frame_coords")
  10. tracks/0/interp = 1
  11. tracks/0/loop_wrap = true
  12. tracks/0/keys = {
  13. "times": PackedFloat32Array(0),
  14. "transitions": PackedFloat32Array(1),
  15. "update": 1,
  16. "values": [Vector2i(0, 0)]
  17. }
  18. [sub_resource type="Animation" id="Animation_bg7is"]
  19. resource_name = "idle_down"
  20. length = 0.8
  21. loop_mode = 1
  22. tracks/0/type = "value"
  23. tracks/0/imported = false
  24. tracks/0/enabled = true
  25. tracks/0/path = NodePath("Sprite2D:frame_coords")
  26. tracks/0/interp = 1
  27. tracks/0/loop_wrap = true
  28. tracks/0/keys = {
  29. "times": PackedFloat32Array(0, 0.4),
  30. "transitions": PackedFloat32Array(1, 1),
  31. "update": 1,
  32. "values": [Vector2i(0, 0), Vector2i(1, 0)]
  33. }
  34. [sub_resource type="Animation" id="Animation_dj4o0"]
  35. resource_name = "rotate_down_left"
  36. length = 0.9
  37. tracks/0/type = "value"
  38. tracks/0/imported = false
  39. tracks/0/enabled = true
  40. tracks/0/path = NodePath("Sprite2D:frame_coords")
  41. tracks/0/interp = 1
  42. tracks/0/loop_wrap = true
  43. tracks/0/keys = {
  44. "times": PackedFloat32Array(0, 0.3, 0.6),
  45. "transitions": PackedFloat32Array(1, 1, 1),
  46. "update": 1,
  47. "values": [Vector2i(0, 0), Vector2i(0, 4), Vector2i(0, 1)]
  48. }
  49. [sub_resource type="Animation" id="Animation_fvuck"]
  50. resource_name = "rotate_down_right"
  51. length = 0.9
  52. tracks/0/type = "value"
  53. tracks/0/imported = false
  54. tracks/0/enabled = true
  55. tracks/0/path = NodePath("Sprite2D:frame_coords")
  56. tracks/0/interp = 1
  57. tracks/0/loop_wrap = true
  58. tracks/0/keys = {
  59. "times": PackedFloat32Array(0, 0.3, 0.6),
  60. "transitions": PackedFloat32Array(1, 1, 1),
  61. "update": 1,
  62. "values": [Vector2i(0, 0), Vector2i(3, 4), Vector2i(0, 3)]
  63. }
  64. [sub_resource type="Animation" id="Animation_q2ysl"]
  65. resource_name = "rotate_left_left"
  66. length = 0.9
  67. tracks/0/type = "value"
  68. tracks/0/imported = false
  69. tracks/0/enabled = true
  70. tracks/0/path = NodePath("Sprite2D:frame_coords")
  71. tracks/0/interp = 1
  72. tracks/0/loop_wrap = true
  73. tracks/0/keys = {
  74. "times": PackedFloat32Array(0, 0.3, 0.6),
  75. "transitions": PackedFloat32Array(1, 1, 1),
  76. "update": 1,
  77. "values": [Vector2i(0, 3), Vector2i(3, 4), Vector2i(0, 0)]
  78. }
  79. [sub_resource type="Animation" id="Animation_tj0l1"]
  80. resource_name = "rotate_left_right"
  81. length = 0.9
  82. tracks/0/type = "value"
  83. tracks/0/imported = false
  84. tracks/0/enabled = true
  85. tracks/0/path = NodePath("Sprite2D:frame_coords")
  86. tracks/0/interp = 1
  87. tracks/0/loop_wrap = true
  88. tracks/0/keys = {
  89. "times": PackedFloat32Array(0, 0.3, 0.6),
  90. "transitions": PackedFloat32Array(1, 1, 1),
  91. "update": 1,
  92. "values": [Vector2i(0, 3), Vector2i(2, 4), Vector2i(0, 2)]
  93. }
  94. [sub_resource type="Animation" id="Animation_ornxw"]
  95. resource_name = "rotate_right_left"
  96. length = 0.9
  97. tracks/0/type = "value"
  98. tracks/0/imported = false
  99. tracks/0/enabled = true
  100. tracks/0/path = NodePath("Sprite2D:frame_coords")
  101. tracks/0/interp = 1
  102. tracks/0/loop_wrap = true
  103. tracks/0/keys = {
  104. "times": PackedFloat32Array(0, 0.3, 0.6),
  105. "transitions": PackedFloat32Array(1, 1, 1),
  106. "update": 1,
  107. "values": [Vector2i(0, 1), Vector2i(1, 4), Vector2i(0, 2)]
  108. }
  109. [sub_resource type="Animation" id="Animation_3suf2"]
  110. resource_name = "rotate_right_right"
  111. length = 0.9
  112. tracks/0/type = "value"
  113. tracks/0/imported = false
  114. tracks/0/enabled = true
  115. tracks/0/path = NodePath("Sprite2D:frame_coords")
  116. tracks/0/interp = 1
  117. tracks/0/loop_wrap = true
  118. tracks/0/keys = {
  119. "times": PackedFloat32Array(0, 0.3, 0.6),
  120. "transitions": PackedFloat32Array(1, 1, 1),
  121. "update": 1,
  122. "values": [Vector2i(0, 1), Vector2i(0, 4), Vector2i(0, 0)]
  123. }
  124. [sub_resource type="Animation" id="Animation_7b8pm"]
  125. resource_name = "rotate_up_left"
  126. length = 0.9
  127. tracks/0/type = "value"
  128. tracks/0/imported = false
  129. tracks/0/enabled = true
  130. tracks/0/path = NodePath("Sprite2D:frame_coords")
  131. tracks/0/interp = 1
  132. tracks/0/loop_wrap = true
  133. tracks/0/keys = {
  134. "times": PackedFloat32Array(0, 0.3, 0.6),
  135. "transitions": PackedFloat32Array(1, 1, 1),
  136. "update": 1,
  137. "values": [Vector2i(0, 2), Vector2i(2, 4), Vector2i(0, 3)]
  138. }
  139. [sub_resource type="Animation" id="Animation_hw307"]
  140. resource_name = "rotate_up_right"
  141. length = 0.9
  142. tracks/0/type = "value"
  143. tracks/0/imported = false
  144. tracks/0/enabled = true
  145. tracks/0/path = NodePath("Sprite2D:frame_coords")
  146. tracks/0/interp = 1
  147. tracks/0/loop_wrap = true
  148. tracks/0/keys = {
  149. "times": PackedFloat32Array(0, 0.3, 0.6),
  150. "transitions": PackedFloat32Array(1, 1, 1),
  151. "update": 1,
  152. "values": [Vector2i(0, 2), Vector2i(1, 4), Vector2i(0, 1)]
  153. }
  154. [sub_resource type="Animation" id="Animation_omr3c"]
  155. resource_name = "run_down"
  156. length = 0.8
  157. loop_mode = 1
  158. tracks/0/type = "value"
  159. tracks/0/imported = false
  160. tracks/0/enabled = true
  161. tracks/0/path = NodePath("Sprite2D:frame_coords")
  162. tracks/0/interp = 1
  163. tracks/0/loop_wrap = true
  164. tracks/0/keys = {
  165. "times": PackedFloat32Array(0, 0.4),
  166. "transitions": PackedFloat32Array(1, 1),
  167. "update": 1,
  168. "values": [Vector2i(2, 0), Vector2i(3, 0)]
  169. }
  170. [sub_resource type="Animation" id="Animation_qu7c2"]
  171. resource_name = "run_left"
  172. length = 0.8
  173. loop_mode = 1
  174. tracks/0/type = "value"
  175. tracks/0/imported = false
  176. tracks/0/enabled = true
  177. tracks/0/path = NodePath("Sprite2D:frame_coords")
  178. tracks/0/interp = 1
  179. tracks/0/loop_wrap = true
  180. tracks/0/keys = {
  181. "times": PackedFloat32Array(0, 0.4),
  182. "transitions": PackedFloat32Array(1, 1),
  183. "update": 1,
  184. "values": [Vector2i(2, 3), Vector2i(3, 3)]
  185. }
  186. [sub_resource type="Animation" id="Animation_kkuhf"]
  187. resource_name = "run_right"
  188. length = 0.8
  189. loop_mode = 1
  190. tracks/0/type = "value"
  191. tracks/0/imported = false
  192. tracks/0/enabled = true
  193. tracks/0/path = NodePath("Sprite2D:frame_coords")
  194. tracks/0/interp = 1
  195. tracks/0/loop_wrap = true
  196. tracks/0/keys = {
  197. "times": PackedFloat32Array(0, 0.4),
  198. "transitions": PackedFloat32Array(1, 1),
  199. "update": 1,
  200. "values": [Vector2i(2, 1), Vector2i(3, 1)]
  201. }
  202. [sub_resource type="Animation" id="Animation_g7wgf"]
  203. resource_name = "run_up"
  204. length = 0.8
  205. loop_mode = 1
  206. tracks/0/type = "value"
  207. tracks/0/imported = false
  208. tracks/0/enabled = true
  209. tracks/0/path = NodePath("Sprite2D:frame_coords")
  210. tracks/0/interp = 1
  211. tracks/0/loop_wrap = true
  212. tracks/0/keys = {
  213. "times": PackedFloat32Array(0, 0.4),
  214. "transitions": PackedFloat32Array(1, 1),
  215. "update": 1,
  216. "values": [Vector2i(2, 2), Vector2i(3, 2)]
  217. }
  218. [sub_resource type="AnimationLibrary" id="AnimationLibrary_88fu0"]
  219. _data = {
  220. "RESET": SubResource("Animation_hjp2n"),
  221. "idle_down": SubResource("Animation_bg7is"),
  222. "rotate_down_left": SubResource("Animation_dj4o0"),
  223. "rotate_down_right": SubResource("Animation_fvuck"),
  224. "rotate_left_left": SubResource("Animation_q2ysl"),
  225. "rotate_left_right": SubResource("Animation_tj0l1"),
  226. "rotate_right_left": SubResource("Animation_ornxw"),
  227. "rotate_right_right": SubResource("Animation_3suf2"),
  228. "rotate_up_left": SubResource("Animation_7b8pm"),
  229. "rotate_up_right": SubResource("Animation_hw307"),
  230. "run_down": SubResource("Animation_omr3c"),
  231. "run_left": SubResource("Animation_qu7c2"),
  232. "run_right": SubResource("Animation_kkuhf"),
  233. "run_up": SubResource("Animation_g7wgf")
  234. }
  235. [node name="Player" type="Node2D"]
  236. script = ExtResource("1_mu74c")
  237. [node name="Sprite2D" type="Sprite2D" parent="."]
  238. texture = ExtResource("2_js4dt")
  239. centered = false
  240. offset = Vector2(-8, -8)
  241. hframes = 7
  242. vframes = 5
  243. [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
  244. libraries = {
  245. "": SubResource("AnimationLibrary_88fu0")
  246. }