coin.tscn 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. [gd_scene load_steps=9 format=3 uid="uid://c3dh7xb6ef76q"]
  2. [ext_resource type="Texture2D" uid="uid://cj2absxg54f75" path="res://level/coin.webp" id="1"]
  3. [ext_resource type="AudioStream" uid="uid://w4j7xs5uhoer" path="res://player/coin_pickup.wav" id="3"]
  4. [ext_resource type="Script" path="res://level/coin.gd" id="4"]
  5. [sub_resource type="Animation" id="Animation_4kkvr"]
  6. length = 0.001
  7. tracks/0/type = "value"
  8. tracks/0/imported = false
  9. tracks/0/enabled = true
  10. tracks/0/path = NodePath(".:monitoring")
  11. tracks/0/interp = 1
  12. tracks/0/loop_wrap = true
  13. tracks/0/keys = {
  14. "times": PackedFloat32Array(0),
  15. "transitions": PackedFloat32Array(1),
  16. "update": 0,
  17. "values": [true]
  18. }
  19. [sub_resource type="Animation" id="1"]
  20. resource_name = "picked"
  21. length = 1.5
  22. step = 0.25
  23. tracks/0/type = "value"
  24. tracks/0/imported = false
  25. tracks/0/enabled = true
  26. tracks/0/path = NodePath("Sprite2D:frame")
  27. tracks/0/interp = 1
  28. tracks/0/loop_wrap = true
  29. tracks/0/keys = {
  30. "times": PackedFloat32Array(0, 1.25),
  31. "transitions": PackedFloat32Array(1, 1),
  32. "update": 0,
  33. "values": [0, 11]
  34. }
  35. tracks/1/type = "method"
  36. tracks/1/imported = false
  37. tracks/1/enabled = true
  38. tracks/1/path = NodePath(".")
  39. tracks/1/interp = 1
  40. tracks/1/loop_wrap = true
  41. tracks/1/keys = {
  42. "times": PackedFloat32Array(1),
  43. "transitions": PackedFloat32Array(1),
  44. "values": [{
  45. "args": [],
  46. "method": &"queue_free"
  47. }]
  48. }
  49. tracks/2/type = "value"
  50. tracks/2/imported = false
  51. tracks/2/enabled = true
  52. tracks/2/path = NodePath("Sprite2D:self_modulate")
  53. tracks/2/interp = 1
  54. tracks/2/loop_wrap = true
  55. tracks/2/keys = {
  56. "times": PackedFloat32Array(0, 0.5),
  57. "transitions": PackedFloat32Array(1, 1),
  58. "update": 0,
  59. "values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
  60. }
  61. tracks/3/type = "value"
  62. tracks/3/imported = false
  63. tracks/3/enabled = true
  64. tracks/3/path = NodePath(".:monitoring")
  65. tracks/3/interp = 1
  66. tracks/3/loop_wrap = true
  67. tracks/3/keys = {
  68. "times": PackedFloat32Array(0),
  69. "transitions": PackedFloat32Array(1),
  70. "update": 0,
  71. "values": [false]
  72. }
  73. tracks/4/type = "value"
  74. tracks/4/imported = false
  75. tracks/4/enabled = true
  76. tracks/4/path = NodePath("Sprite2D:position")
  77. tracks/4/interp = 1
  78. tracks/4/loop_wrap = true
  79. tracks/4/keys = {
  80. "times": PackedFloat32Array(0, 1.5),
  81. "transitions": PackedFloat32Array(1, 1),
  82. "update": 0,
  83. "values": [Vector2(0, 0), Vector2(0, -42)]
  84. }
  85. tracks/5/type = "audio"
  86. tracks/5/imported = false
  87. tracks/5/enabled = true
  88. tracks/5/path = NodePath("Pickup")
  89. tracks/5/interp = 1
  90. tracks/5/loop_wrap = true
  91. tracks/5/keys = {
  92. "clips": [{
  93. "end_offset": 0.0,
  94. "start_offset": 0.0,
  95. "stream": ExtResource("3")
  96. }],
  97. "times": PackedFloat32Array(0)
  98. }
  99. tracks/5/use_blend = true
  100. [sub_resource type="Animation" id="2"]
  101. loop_mode = 1
  102. step = 0.25
  103. tracks/0/type = "value"
  104. tracks/0/imported = false
  105. tracks/0/enabled = true
  106. tracks/0/path = NodePath("Sprite2D:frame")
  107. tracks/0/interp = 1
  108. tracks/0/loop_wrap = true
  109. tracks/0/keys = {
  110. "times": PackedFloat32Array(0, 0.16675, 0.3335, 0.50025, 0.667, 0.83375, 1.0005),
  111. "transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1),
  112. "update": 1,
  113. "values": [0, 1, 2, 3, 2, 1, 0]
  114. }
  115. tracks/1/type = "value"
  116. tracks/1/imported = false
  117. tracks/1/enabled = true
  118. tracks/1/path = NodePath("Sprite2D:position")
  119. tracks/1/interp = 1
  120. tracks/1/loop_wrap = true
  121. tracks/1/keys = {
  122. "times": PackedFloat32Array(0),
  123. "transitions": PackedFloat32Array(1),
  124. "update": 2,
  125. "values": [Vector2(0, 0)]
  126. }
  127. tracks/2/type = "value"
  128. tracks/2/imported = false
  129. tracks/2/enabled = true
  130. tracks/2/path = NodePath("Sprite2D:self_modulate")
  131. tracks/2/interp = 1
  132. tracks/2/loop_wrap = true
  133. tracks/2/keys = {
  134. "times": PackedFloat32Array(0),
  135. "transitions": PackedFloat32Array(1),
  136. "update": 2,
  137. "values": [Color(1, 1, 1, 1)]
  138. }
  139. tracks/3/type = "value"
  140. tracks/3/imported = false
  141. tracks/3/enabled = true
  142. tracks/3/path = NodePath(".:monitoring")
  143. tracks/3/interp = 1
  144. tracks/3/loop_wrap = true
  145. tracks/3/keys = {
  146. "times": PackedFloat32Array(0),
  147. "transitions": PackedFloat32Array(1),
  148. "update": 2,
  149. "values": [true]
  150. }
  151. [sub_resource type="AnimationLibrary" id="AnimationLibrary_i7oeb"]
  152. _data = {
  153. "RESET": SubResource("Animation_4kkvr"),
  154. "picked": SubResource("1"),
  155. "spinning": SubResource("2")
  156. }
  157. [sub_resource type="CircleShape2D" id="3"]
  158. radius = 10.0499
  159. [node name="Coin" type="Area2D"]
  160. collision_layer = 0
  161. monitorable = false
  162. script = ExtResource("4")
  163. [node name="Sprite2D" type="Sprite2D" parent="."]
  164. scale = Vector2(0.65, 0.65)
  165. texture = ExtResource("1")
  166. hframes = 8
  167. vframes = 2
  168. [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
  169. libraries = {
  170. "": SubResource("AnimationLibrary_i7oeb")
  171. }
  172. autoplay = "spinning"
  173. [node name="CollisionShape2D" type="CollisionShape2D" parent="."]
  174. shape = SubResource("3")
  175. [node name="Pickup" type="AudioStreamPlayer2D" parent="."]
  176. [connection signal="body_entered" from="." to="." method="_on_body_entered"]