character.tscn 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. [gd_scene load_steps=21 format=3 uid="uid://bdni5iw2j108j"]
  2. [ext_resource type="Script" path="res://grid_movement/pawns/walker.gd" id="1"]
  3. [ext_resource type="Texture2D" uid="uid://ba5rklp7brg7" path="res://grid_movement/pawns/character.png" id="2"]
  4. [ext_resource type="Texture2D" uid="uid://c7n37h1euodch" path="res://grid_movement/pawns/player_exploration.png" id="3"]
  5. [ext_resource type="Texture2D" uid="uid://c5mr2yqxvctld" path="res://grid_movement/pawns/player_exploration_bump.png" id="4"]
  6. [sub_resource type="Animation" id="3"]
  7. length = 0.001
  8. [sub_resource type="Animation" id="1"]
  9. resource_name = "bump"
  10. length = 0.25
  11. step = 0.01
  12. tracks/0/type = "value"
  13. tracks/0/imported = false
  14. tracks/0/enabled = true
  15. tracks/0/path = NodePath("Pivot/Sprite2D:position")
  16. tracks/0/interp = 1
  17. tracks/0/loop_wrap = true
  18. tracks/0/keys = {
  19. "times": PackedFloat32Array(0, 0.05, 0.1, 0.15, 0.2, 0.25),
  20. "transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1),
  21. "update": 0,
  22. "values": [Vector2(0, 0), Vector2(-0.6, -1), Vector2(1, 0.6), Vector2(-1.2, 1), Vector2(0.5, -0.5), Vector2(0, 0)]
  23. }
  24. tracks/1/type = "value"
  25. tracks/1/imported = false
  26. tracks/1/enabled = true
  27. tracks/1/path = NodePath("Pivot/Slime:position")
  28. tracks/1/interp = 1
  29. tracks/1/loop_wrap = true
  30. tracks/1/keys = {
  31. "times": PackedFloat32Array(0, 0.05, 0.1, 0.15, 0.2, 0.25),
  32. "transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1),
  33. "update": 0,
  34. "values": [Vector2(0, 0), Vector2(-3, -4), Vector2(2, 1.5), Vector2(-2.6, 2), Vector2(1.8, -1.9), Vector2(0, 0)]
  35. }
  36. tracks/2/type = "value"
  37. tracks/2/imported = false
  38. tracks/2/enabled = true
  39. tracks/2/path = NodePath("Pivot/Slime:scale")
  40. tracks/2/interp = 1
  41. tracks/2/loop_wrap = true
  42. tracks/2/keys = {
  43. "times": PackedFloat32Array(0, 0.25),
  44. "transitions": PackedFloat32Array(1, 1),
  45. "update": 0,
  46. "values": [Vector2(1, 1), Vector2(1, 1)]
  47. }
  48. tracks/3/type = "value"
  49. tracks/3/imported = false
  50. tracks/3/enabled = true
  51. tracks/3/path = NodePath("Pivot/Slime:texture")
  52. tracks/3/interp = 1
  53. tracks/3/loop_wrap = true
  54. tracks/3/keys = {
  55. "times": PackedFloat32Array(0, 0.24, 0.25),
  56. "transitions": PackedFloat32Array(1, 1, 1),
  57. "update": 1,
  58. "values": [ExtResource("4"), ExtResource("4"), ExtResource("3")]
  59. }
  60. [sub_resource type="Animation" id="4"]
  61. resource_name = "idle"
  62. length = 1.5
  63. loop_mode = 1
  64. tracks/0/type = "value"
  65. tracks/0/imported = false
  66. tracks/0/enabled = true
  67. tracks/0/path = NodePath("Pivot/Slime:position")
  68. tracks/0/interp = 1
  69. tracks/0/loop_wrap = true
  70. tracks/0/keys = {
  71. "times": PackedFloat32Array(0, 0.3, 0.7, 1.5),
  72. "transitions": PackedFloat32Array(1, 0.5, 2, 1),
  73. "update": 0,
  74. "values": [Vector2(0, 0), Vector2(0, 5), Vector2(0, -4.498), Vector2(0, 0)]
  75. }
  76. tracks/1/type = "value"
  77. tracks/1/imported = false
  78. tracks/1/enabled = true
  79. tracks/1/path = NodePath("Pivot/Slime:scale")
  80. tracks/1/interp = 1
  81. tracks/1/loop_wrap = true
  82. tracks/1/keys = {
  83. "times": PackedFloat32Array(0, 0.3, 0.7, 1.5),
  84. "transitions": PackedFloat32Array(1, 0.5, 2, 1),
  85. "update": 0,
  86. "values": [Vector2(1, 1), Vector2(1.125, 0.844), Vector2(0.906, 1.141), Vector2(1, 1)]
  87. }
  88. tracks/2/type = "value"
  89. tracks/2/imported = false
  90. tracks/2/enabled = false
  91. tracks/2/path = NodePath("Pivot/Slime:texture")
  92. tracks/2/interp = 1
  93. tracks/2/loop_wrap = true
  94. tracks/2/keys = {
  95. "times": PackedFloat32Array(0, 1.5),
  96. "transitions": PackedFloat32Array(1, 1),
  97. "update": 1,
  98. "values": [ExtResource("3"), ExtResource("3")]
  99. }
  100. [sub_resource type="Animation" id="2"]
  101. resource_name = "walk"
  102. length = 0.25
  103. step = 0.05
  104. tracks/0/type = "value"
  105. tracks/0/imported = false
  106. tracks/0/enabled = false
  107. tracks/0/path = NodePath("Pivot/Sprite2D:self_modulate")
  108. tracks/0/interp = 1
  109. tracks/0/loop_wrap = true
  110. tracks/0/keys = {
  111. "times": PackedFloat32Array(0, 0.1, 0.25),
  112. "transitions": PackedFloat32Array(1, 1, 1),
  113. "update": 0,
  114. "values": [Color(1, 1, 1, 1), Color(1, 0.9375, 0, 1), Color(1, 1, 1, 1)]
  115. }
  116. tracks/1/type = "value"
  117. tracks/1/imported = false
  118. tracks/1/enabled = true
  119. tracks/1/path = NodePath("Pivot/Sprite2D:position")
  120. tracks/1/interp = 1
  121. tracks/1/loop_wrap = true
  122. tracks/1/keys = {
  123. "times": PackedFloat32Array(0, 0.1, 0.15, 0.25),
  124. "transitions": PackedFloat32Array(1, 0.303143, 2.61003, 1),
  125. "update": 0,
  126. "values": [Vector2(1.43051e-06, -1.90735e-06), Vector2(1.43051e-06, -1.90735e-06), Vector2(0, -20), Vector2(1.43051e-06, -1.90735e-06)]
  127. }
  128. tracks/2/type = "value"
  129. tracks/2/imported = false
  130. tracks/2/enabled = true
  131. tracks/2/path = NodePath("Pivot/Sprite2D:scale")
  132. tracks/2/interp = 1
  133. tracks/2/loop_wrap = true
  134. tracks/2/keys = {
  135. "times": PackedFloat32Array(0, 0.05, 0.15, 0.25),
  136. "transitions": PackedFloat32Array(1, 0.354553, 1, 1),
  137. "update": 0,
  138. "values": [Vector2(1, 1), Vector2(1.20007, 0.917384), Vector2(0.916712, 1.13495), Vector2(1, 1)]
  139. }
  140. tracks/3/type = "value"
  141. tracks/3/imported = false
  142. tracks/3/enabled = true
  143. tracks/3/path = NodePath("Pivot/Slime:position")
  144. tracks/3/interp = 1
  145. tracks/3/loop_wrap = true
  146. tracks/3/keys = {
  147. "times": PackedFloat32Array(0, 0.1, 0.15, 0.25),
  148. "transitions": PackedFloat32Array(1, 0.378929, 2.63902, 1),
  149. "update": 0,
  150. "values": [Vector2(0, 0), Vector2(0, 0), Vector2(0, -20), Vector2(0, 0)]
  151. }
  152. tracks/4/type = "value"
  153. tracks/4/imported = false
  154. tracks/4/enabled = true
  155. tracks/4/path = NodePath("Pivot/Slime:scale")
  156. tracks/4/interp = 1
  157. tracks/4/loop_wrap = true
  158. tracks/4/keys = {
  159. "times": PackedFloat32Array(0, 0.05, 0.15, 0.25),
  160. "transitions": PackedFloat32Array(1, 0.353553, 1, 1),
  161. "update": 0,
  162. "values": [Vector2(1, 1), Vector2(1.2, 0.917), Vector2(0.917, 1.135), Vector2(1, 1)]
  163. }
  164. tracks/5/type = "value"
  165. tracks/5/imported = false
  166. tracks/5/enabled = false
  167. tracks/5/path = NodePath("Pivot/Slime:texture")
  168. tracks/5/interp = 1
  169. tracks/5/loop_wrap = true
  170. tracks/5/keys = {
  171. "times": PackedFloat32Array(0, 0.25),
  172. "transitions": PackedFloat32Array(1, 1),
  173. "update": 1,
  174. "values": [ExtResource("3"), ExtResource("3")]
  175. }
  176. [sub_resource type="AnimationLibrary" id="AnimationLibrary_yxglf"]
  177. _data = {
  178. "RESET": SubResource("3"),
  179. "bump": SubResource("1"),
  180. "idle": SubResource("4"),
  181. "walk": SubResource("2")
  182. }
  183. [sub_resource type="AnimationNodeAnimation" id="9"]
  184. animation = &"bump"
  185. [sub_resource type="AnimationNodeAnimation" id="7"]
  186. animation = &"idle"
  187. [sub_resource type="AnimationNodeAnimation" id="10"]
  188. animation = &"walk"
  189. [sub_resource type="AnimationNodeStateMachineTransition" id="11"]
  190. [sub_resource type="AnimationNodeStateMachineTransition" id="12"]
  191. [sub_resource type="AnimationNodeStateMachineTransition" id="13"]
  192. [sub_resource type="AnimationNodeStateMachineTransition" id="14"]
  193. [sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_ed7tp"]
  194. advance_mode = 2
  195. [sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_j3wgi"]
  196. advance_mode = 0
  197. [sub_resource type="AnimationNodeStateMachine" id="5"]
  198. states/End/position = Vector2(245, -15)
  199. states/Start/position = Vector2(-22, 84)
  200. states/bump/node = SubResource("9")
  201. states/bump/position = Vector2(139, 194)
  202. states/idle/node = SubResource("7")
  203. states/idle/position = Vector2(139, 36)
  204. states/walk/node = SubResource("10")
  205. states/walk/position = Vector2(310, 116)
  206. transitions = ["walk", "idle", SubResource("11"), "bump", "idle", SubResource("12"), "idle", "walk", SubResource("13"), "idle", "bump", SubResource("14"), "Start", "idle", SubResource("AnimationNodeStateMachineTransition_ed7tp"), "idle", "End", SubResource("AnimationNodeStateMachineTransition_j3wgi")]
  207. graph_offset = Vector2(-609, -158)
  208. [sub_resource type="AnimationNodeStateMachinePlayback" id="6"]
  209. [node name="Character" type="Node2D"]
  210. z_index = 1
  211. position = Vector2(32, 32)
  212. script = ExtResource("1")
  213. [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
  214. libraries = {
  215. "": SubResource("AnimationLibrary_yxglf")
  216. }
  217. [node name="Pivot" type="Marker2D" parent="."]
  218. [node name="Slime" type="Sprite2D" parent="Pivot"]
  219. position = Vector2(0, -4.37912)
  220. scale = Vector2(0.908741, 1.13728)
  221. texture = ExtResource("3")
  222. centered = false
  223. offset = Vector2(-32, -32)
  224. [node name="Sprite2D" type="Sprite2D" parent="Pivot"]
  225. visible = false
  226. self_modulate = Color(0, 0, 0, 1)
  227. scale = Vector2(1e-05, 1e-05)
  228. texture = ExtResource("2")
  229. centered = false
  230. offset = Vector2(-32, -32)
  231. [node name="AnimationTree" type="AnimationTree" parent="."]
  232. tree_root = SubResource("5")
  233. anim_player = NodePath("../AnimationPlayer")
  234. active = true
  235. parameters/playback = SubResource("6")