coin.tscn 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. [gd_scene load_steps=11 format=3 uid="uid://6uilf6rad880"]
  2. [ext_resource type="Script" path="res://coin/coin.gd" id="1"]
  3. [ext_resource type="Texture2D" uid="uid://bio1crwbvrmc2" path="res://coin/coin.png" id="2"]
  4. [ext_resource type="AudioStream" uid="uid://cy7lxrapbqu1r" path="res://audio/sound_coin.wav" id="3"]
  5. [ext_resource type="Texture2D" uid="uid://7sv64orewgmb" path="res://player/bullet.png" id="4"]
  6. [sub_resource type="Animation" id="1"]
  7. resource_name = "spin"
  8. length = 0.5
  9. loop_mode = 1
  10. step = 0.25
  11. tracks/0/type = "value"
  12. tracks/0/imported = false
  13. tracks/0/enabled = true
  14. tracks/0/path = NodePath("Sprite2D:frame")
  15. tracks/0/interp = 1
  16. tracks/0/loop_wrap = true
  17. tracks/0/keys = {
  18. "times": PackedFloat32Array(0, 0.08325, 0.1665, 0.24975, 0.333, 0.41625, 0.4995),
  19. "transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1),
  20. "update": 1,
  21. "values": [0, 1, 2, 3, 2, 1, 0]
  22. }
  23. [sub_resource type="Animation" id="2"]
  24. length = 3.0
  25. step = 0.0
  26. tracks/0/type = "value"
  27. tracks/0/imported = false
  28. tracks/0/enabled = true
  29. tracks/0/path = NodePath("Sprite2D:frame")
  30. tracks/0/interp = 1
  31. tracks/0/loop_wrap = true
  32. tracks/0/keys = {
  33. "times": PackedFloat32Array(0),
  34. "transitions": PackedFloat32Array(1),
  35. "update": 1,
  36. "values": [0]
  37. }
  38. tracks/1/type = "value"
  39. tracks/1/imported = false
  40. tracks/1/enabled = true
  41. tracks/1/path = NodePath("GPUParticles3D:emitting")
  42. tracks/1/interp = 1
  43. tracks/1/loop_wrap = true
  44. tracks/1/keys = {
  45. "times": PackedFloat32Array(0),
  46. "transitions": PackedFloat32Array(1),
  47. "update": 1,
  48. "values": [true]
  49. }
  50. tracks/2/type = "method"
  51. tracks/2/imported = false
  52. tracks/2/enabled = true
  53. tracks/2/path = NodePath(".")
  54. tracks/2/interp = 1
  55. tracks/2/loop_wrap = true
  56. tracks/2/keys = {
  57. "times": PackedFloat32Array(2.7),
  58. "transitions": PackedFloat32Array(1),
  59. "values": [{
  60. "args": [],
  61. "method": &"queue_free"
  62. }]
  63. }
  64. tracks/3/type = "value"
  65. tracks/3/imported = false
  66. tracks/3/enabled = true
  67. tracks/3/path = NodePath("Sound:playing")
  68. tracks/3/interp = 1
  69. tracks/3/loop_wrap = true
  70. tracks/3/keys = {
  71. "times": PackedFloat32Array(0),
  72. "transitions": PackedFloat32Array(1),
  73. "update": 1,
  74. "values": [true]
  75. }
  76. tracks/4/type = "value"
  77. tracks/4/imported = false
  78. tracks/4/enabled = true
  79. tracks/4/path = NodePath("Sprite2D:self_modulate")
  80. tracks/4/interp = 1
  81. tracks/4/loop_wrap = true
  82. tracks/4/keys = {
  83. "times": PackedFloat32Array(0, 0.41),
  84. "transitions": PackedFloat32Array(1, 1),
  85. "update": 0,
  86. "values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
  87. }
  88. [sub_resource type="AnimationLibrary" id="AnimationLibrary_4atuj"]
  89. _data = {
  90. "spin": SubResource("1"),
  91. "taken": SubResource("2")
  92. }
  93. [sub_resource type="CircleShape2D" id="3"]
  94. radius = 5.0
  95. [sub_resource type="CanvasItemMaterial" id="4"]
  96. blend_mode = 1
  97. [sub_resource type="Curve" id="5"]
  98. _data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.1, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
  99. point_count = 3
  100. [node name="Coin" type="Area2D"]
  101. script = ExtResource("1")
  102. [node name="Sprite2D" type="Sprite2D" parent="."]
  103. texture = ExtResource("2")
  104. hframes = 4
  105. [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
  106. libraries = {
  107. "": SubResource("AnimationLibrary_4atuj")
  108. }
  109. autoplay = "spin"
  110. [node name="Collision" type="CollisionShape2D" parent="."]
  111. shape = SubResource("3")
  112. [node name="Sound" type="AudioStreamPlayer2D" parent="."]
  113. stream = ExtResource("3")
  114. [node name="GPUParticles3D" type="CPUParticles2D" parent="."]
  115. modulate = Color(0.596078, 0.639216, 1, 1)
  116. material = SubResource("4")
  117. emitting = false
  118. lifetime = 0.4
  119. one_shot = true
  120. explosiveness = 0.7
  121. texture = ExtResource("4")
  122. emission_shape = 1
  123. emission_sphere_radius = 4.0
  124. gravity = Vector2(0, 0)
  125. scale_amount_curve = SubResource("5")
  126. [node name="Enabler" type="VisibleOnScreenEnabler2D" parent="."]
  127. rect = Rect2(-5, -5, 10, 10)
  128. [connection signal="body_entered" from="." to="." method="_on_body_enter"]