Sword.tscn 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. [gd_scene load_steps=9 format=3 uid="uid://cdacdp11r3jua"]
  2. [ext_resource type="Script" path="res://player/weapon/sword.gd" id="1"]
  3. [ext_resource type="Texture2D" uid="uid://7cfjw83v5m75" path="res://player/weapon/sword.png" id="2"]
  4. [sub_resource type="Animation" id="1"]
  5. resource_name = "SETUP"
  6. tracks/0/type = "value"
  7. tracks/0/imported = false
  8. tracks/0/enabled = true
  9. tracks/0/path = NodePath(".:rotation_degrees")
  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": 0,
  16. "values": [0.0]
  17. }
  18. tracks/1/type = "value"
  19. tracks/1/imported = false
  20. tracks/1/enabled = true
  21. tracks/1/path = NodePath(".:scale")
  22. tracks/1/interp = 1
  23. tracks/1/loop_wrap = true
  24. tracks/1/keys = {
  25. "times": PackedFloat32Array(0),
  26. "transitions": PackedFloat32Array(1),
  27. "update": 0,
  28. "values": [Vector2(1, 1)]
  29. }
  30. tracks/2/type = "value"
  31. tracks/2/imported = false
  32. tracks/2/enabled = true
  33. tracks/2/path = NodePath(".:visible")
  34. tracks/2/interp = 1
  35. tracks/2/loop_wrap = true
  36. tracks/2/keys = {
  37. "times": PackedFloat32Array(0),
  38. "transitions": PackedFloat32Array(1),
  39. "update": 1,
  40. "values": [true]
  41. }
  42. tracks/3/type = "value"
  43. tracks/3/imported = false
  44. tracks/3/enabled = true
  45. tracks/3/path = NodePath(".:monitoring")
  46. tracks/3/interp = 1
  47. tracks/3/loop_wrap = true
  48. tracks/3/keys = {
  49. "times": PackedFloat32Array(0),
  50. "transitions": PackedFloat32Array(1),
  51. "update": 1,
  52. "values": [true]
  53. }
  54. tracks/4/type = "value"
  55. tracks/4/imported = false
  56. tracks/4/enabled = true
  57. tracks/4/path = NodePath(".:monitorable")
  58. tracks/4/interp = 1
  59. tracks/4/loop_wrap = true
  60. tracks/4/keys = {
  61. "times": PackedFloat32Array(0),
  62. "transitions": PackedFloat32Array(1),
  63. "update": 1,
  64. "values": [false]
  65. }
  66. [sub_resource type="Animation" id="2"]
  67. resource_name = "attack_circular"
  68. length = 0.3
  69. step = 0.05
  70. tracks/0/type = "value"
  71. tracks/0/imported = false
  72. tracks/0/enabled = true
  73. tracks/0/path = NodePath(".:rotation_degrees")
  74. tracks/0/interp = 1
  75. tracks/0/loop_wrap = true
  76. tracks/0/keys = {
  77. "times": PackedFloat32Array(0, 0.15, 0.2),
  78. "transitions": PackedFloat32Array(0.439427, 1, 1),
  79. "update": 0,
  80. "values": [-100.0, 100.0, 90.0]
  81. }
  82. tracks/1/type = "value"
  83. tracks/1/imported = false
  84. tracks/1/enabled = true
  85. tracks/1/path = NodePath(".:scale")
  86. tracks/1/interp = 1
  87. tracks/1/loop_wrap = true
  88. tracks/1/keys = {
  89. "times": PackedFloat32Array(0, 0.05, 0.15, 0.2),
  90. "transitions": PackedFloat32Array(1, 2.50795, 1, 1),
  91. "update": 0,
  92. "values": [Vector2(1, 1), Vector2(1, 1.3), Vector2(1, 1), Vector2(1, 1)]
  93. }
  94. tracks/2/type = "value"
  95. tracks/2/imported = false
  96. tracks/2/enabled = true
  97. tracks/2/path = NodePath(".:visible")
  98. tracks/2/interp = 1
  99. tracks/2/loop_wrap = true
  100. tracks/2/keys = {
  101. "times": PackedFloat32Array(0),
  102. "transitions": PackedFloat32Array(1),
  103. "update": 1,
  104. "values": [true]
  105. }
  106. [sub_resource type="Animation" id="3"]
  107. length = 0.45
  108. step = 0.05
  109. tracks/0/type = "value"
  110. tracks/0/imported = false
  111. tracks/0/enabled = true
  112. tracks/0/path = NodePath(".:rotation_degrees")
  113. tracks/0/interp = 1
  114. tracks/0/loop_wrap = true
  115. tracks/0/keys = {
  116. "times": PackedFloat32Array(0, 0.15, 0.2),
  117. "transitions": PackedFloat32Array(0.439427, 1, 1),
  118. "update": 0,
  119. "values": [-80.0, 85.0, 75.0]
  120. }
  121. tracks/1/type = "value"
  122. tracks/1/imported = false
  123. tracks/1/enabled = true
  124. tracks/1/path = NodePath(".:scale")
  125. tracks/1/interp = 1
  126. tracks/1/loop_wrap = true
  127. tracks/1/keys = {
  128. "times": PackedFloat32Array(0, 0.05, 0.15, 0.2),
  129. "transitions": PackedFloat32Array(1, 2.50795, 1, 1),
  130. "update": 0,
  131. "values": [Vector2(1, 1), Vector2(1, 1.3), Vector2(1, 1), Vector2(1, 1)]
  132. }
  133. tracks/2/type = "value"
  134. tracks/2/imported = false
  135. tracks/2/enabled = true
  136. tracks/2/path = NodePath(".:visible")
  137. tracks/2/interp = 1
  138. tracks/2/loop_wrap = true
  139. tracks/2/keys = {
  140. "times": PackedFloat32Array(0),
  141. "transitions": PackedFloat32Array(1),
  142. "update": 1,
  143. "values": [true]
  144. }
  145. tracks/3/type = "method"
  146. tracks/3/imported = false
  147. tracks/3/enabled = true
  148. tracks/3/path = NodePath(".")
  149. tracks/3/interp = 1
  150. tracks/3/loop_wrap = true
  151. tracks/3/keys = {
  152. "times": PackedFloat32Array(0.1, 0.25),
  153. "transitions": PackedFloat32Array(1, 1),
  154. "values": [{
  155. "args": [],
  156. "method": &"set_attack_input_listening"
  157. }, {
  158. "args": [],
  159. "method": &"set_ready_for_next_attack"
  160. }]
  161. }
  162. [sub_resource type="Animation" id="4"]
  163. resource_name = "attack_medium"
  164. length = 0.5
  165. step = 0.05
  166. tracks/0/type = "value"
  167. tracks/0/imported = false
  168. tracks/0/enabled = true
  169. tracks/0/path = NodePath(".:rotation_degrees")
  170. tracks/0/interp = 1
  171. tracks/0/loop_wrap = true
  172. tracks/0/keys = {
  173. "times": PackedFloat32Array(0.05, 0.25, 0.35),
  174. "transitions": PackedFloat32Array(0.439427, 1, 1),
  175. "update": 0,
  176. "values": [95.0, -95.0, -90.0]
  177. }
  178. tracks/1/type = "value"
  179. tracks/1/imported = false
  180. tracks/1/enabled = true
  181. tracks/1/path = NodePath(".:scale")
  182. tracks/1/interp = 1
  183. tracks/1/loop_wrap = true
  184. tracks/1/keys = {
  185. "times": PackedFloat32Array(0, 0.1, 0.2, 0.25),
  186. "transitions": PackedFloat32Array(1, 2.50795, 1, 1),
  187. "update": 0,
  188. "values": [Vector2(1, 1), Vector2(1, 1.3), Vector2(1, 1), Vector2(1, 1)]
  189. }
  190. tracks/2/type = "value"
  191. tracks/2/imported = false
  192. tracks/2/enabled = true
  193. tracks/2/path = NodePath(".:visible")
  194. tracks/2/interp = 1
  195. tracks/2/loop_wrap = true
  196. tracks/2/keys = {
  197. "times": PackedFloat32Array(0),
  198. "transitions": PackedFloat32Array(1),
  199. "update": 1,
  200. "values": [true]
  201. }
  202. [sub_resource type="Animation" id="5"]
  203. length = 0.01
  204. tracks/0/type = "value"
  205. tracks/0/imported = false
  206. tracks/0/enabled = true
  207. tracks/0/path = NodePath(".:visible")
  208. tracks/0/interp = 1
  209. tracks/0/loop_wrap = true
  210. tracks/0/keys = {
  211. "times": PackedFloat32Array(0),
  212. "transitions": PackedFloat32Array(1),
  213. "update": 1,
  214. "values": [false]
  215. }
  216. [sub_resource type="AnimationLibrary" id="AnimationLibrary_6cp3i"]
  217. _data = {
  218. "SETUP": SubResource("1"),
  219. "attack_circular": SubResource("2"),
  220. "attack_fast": SubResource("3"),
  221. "attack_medium": SubResource("4"),
  222. "idle": SubResource("5")
  223. }
  224. [node name="Sword" type="Area2D"]
  225. collision_layer = 16
  226. collision_mask = 3
  227. input_pickable = false
  228. monitorable = false
  229. script = ExtResource("1")
  230. [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
  231. libraries = {
  232. "": SubResource("AnimationLibrary_6cp3i")
  233. }
  234. [node name="Sword" type="Sprite2D" parent="."]
  235. position = Vector2(4, 0)
  236. texture = ExtResource("2")
  237. offset = Vector2(67, 0)
  238. [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
  239. polygon = PackedVector2Array(28.0001, -15.9999, 136, -15.9995, 160, 0, 136, 16.0005, 27.9999, 16.0001)