coin.tscn 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. [gd_scene load_steps=19 format=3 uid="uid://dfxo2jwbj4aeh"]
  2. [ext_resource type="Script" path="res://coin/coin.gd" id="1"]
  3. [ext_resource type="AudioStream" uid="uid://b23l5nfatq2d2" path="res://coin/sound_coin.wav" id="2"]
  4. [ext_resource type="Material" uid="uid://dp0bangabfrg" path="res://coin/coin_material.tres" id="2_n0rbc"]
  5. [ext_resource type="Texture2D" uid="uid://y3opjgnv67r8" path="res://particle.webp" id="3"]
  6. [sub_resource type="CylinderMesh" id="CylinderMesh_fpglg"]
  7. top_radius = 0.2
  8. bottom_radius = 0.2
  9. height = 0.05
  10. radial_segments = 16
  11. rings = 1
  12. [sub_resource type="QuadMesh" id="QuadMesh_kqa4x"]
  13. [sub_resource type="Gradient" id="Gradient_cd1ha"]
  14. interpolation_mode = 2
  15. offsets = PackedFloat32Array(0, 0.642276, 1)
  16. colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0.180392, 1, 1, 1, 0)
  17. [sub_resource type="GradientTexture2D" id="GradientTexture2D_qhu5r"]
  18. gradient = SubResource("Gradient_cd1ha")
  19. fill = 1
  20. fill_from = Vector2(0.5, 0.5)
  21. fill_to = Vector2(0.5, 0.01)
  22. [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_7q0mq"]
  23. transparency = 1
  24. blend_mode = 1
  25. shading_mode = 0
  26. albedo_color = Color(1, 0.858824, 0.572549, 0.25098)
  27. albedo_texture = SubResource("GradientTexture2D_qhu5r")
  28. billboard_mode = 1
  29. proximity_fade_enabled = true
  30. proximity_fade_distance = 0.15
  31. [sub_resource type="Animation" id="Animation_r4jod"]
  32. length = 0.001
  33. tracks/0/type = "value"
  34. tracks/0/imported = false
  35. tracks/0/enabled = true
  36. tracks/0/path = NodePath("Circle:rotation")
  37. tracks/0/interp = 1
  38. tracks/0/loop_wrap = true
  39. tracks/0/keys = {
  40. "times": PackedFloat32Array(0),
  41. "transitions": PackedFloat32Array(1),
  42. "update": 0,
  43. "values": [Vector3(1.5708, 0, 0)]
  44. }
  45. tracks/1/type = "value"
  46. tracks/1/imported = false
  47. tracks/1/enabled = true
  48. tracks/1/path = NodePath("Circle:visible")
  49. tracks/1/interp = 1
  50. tracks/1/loop_wrap = true
  51. tracks/1/keys = {
  52. "times": PackedFloat32Array(0),
  53. "transitions": PackedFloat32Array(1),
  54. "update": 1,
  55. "values": [true]
  56. }
  57. tracks/2/type = "value"
  58. tracks/2/imported = false
  59. tracks/2/enabled = true
  60. tracks/2/path = NodePath("GlowSprite:transparency")
  61. tracks/2/interp = 1
  62. tracks/2/loop_wrap = true
  63. tracks/2/keys = {
  64. "times": PackedFloat32Array(0),
  65. "transitions": PackedFloat32Array(1),
  66. "update": 0,
  67. "values": [0.0]
  68. }
  69. tracks/3/type = "value"
  70. tracks/3/imported = false
  71. tracks/3/enabled = true
  72. tracks/3/path = NodePath("GlowSprite:visible")
  73. tracks/3/interp = 1
  74. tracks/3/loop_wrap = true
  75. tracks/3/keys = {
  76. "times": PackedFloat32Array(0),
  77. "transitions": PackedFloat32Array(1),
  78. "update": 1,
  79. "values": [true]
  80. }
  81. [sub_resource type="Animation" id="3"]
  82. resource_name = "spin"
  83. length = 2.0
  84. loop_mode = 1
  85. tracks/0/type = "value"
  86. tracks/0/imported = false
  87. tracks/0/enabled = true
  88. tracks/0/path = NodePath("Circle:rotation")
  89. tracks/0/interp = 1
  90. tracks/0/loop_wrap = true
  91. tracks/0/keys = {
  92. "times": PackedFloat32Array(0, 2),
  93. "transitions": PackedFloat32Array(1, 1),
  94. "update": 0,
  95. "values": [Vector3(1.5708, 6.28319, 0), Vector3(1.5708, 0, 0)]
  96. }
  97. tracks/1/type = "value"
  98. tracks/1/imported = false
  99. tracks/1/enabled = true
  100. tracks/1/path = NodePath("Circle:visible")
  101. tracks/1/interp = 1
  102. tracks/1/loop_wrap = true
  103. tracks/1/keys = {
  104. "times": PackedFloat32Array(0),
  105. "transitions": PackedFloat32Array(1),
  106. "update": 1,
  107. "values": [true]
  108. }
  109. [sub_resource type="Animation" id="4"]
  110. resource_name = "take"
  111. tracks/0/type = "value"
  112. tracks/0/imported = false
  113. tracks/0/enabled = true
  114. tracks/0/path = NodePath("Circle:visible")
  115. tracks/0/interp = 1
  116. tracks/0/loop_wrap = true
  117. tracks/0/keys = {
  118. "times": PackedFloat32Array(0),
  119. "transitions": PackedFloat32Array(1),
  120. "update": 1,
  121. "values": [false]
  122. }
  123. tracks/1/type = "value"
  124. tracks/1/imported = false
  125. tracks/1/enabled = true
  126. tracks/1/path = NodePath("CPUParticles3D:emitting")
  127. tracks/1/interp = 1
  128. tracks/1/loop_wrap = true
  129. tracks/1/keys = {
  130. "times": PackedFloat32Array(0),
  131. "transitions": PackedFloat32Array(1),
  132. "update": 1,
  133. "values": [true]
  134. }
  135. tracks/2/type = "value"
  136. tracks/2/imported = false
  137. tracks/2/enabled = true
  138. tracks/2/path = NodePath("Sound:playing")
  139. tracks/2/interp = 1
  140. tracks/2/loop_wrap = true
  141. tracks/2/keys = {
  142. "times": PackedFloat32Array(0),
  143. "transitions": PackedFloat32Array(1),
  144. "update": 1,
  145. "values": [true]
  146. }
  147. tracks/3/type = "value"
  148. tracks/3/imported = false
  149. tracks/3/enabled = true
  150. tracks/3/path = NodePath("GlowSprite:transparency")
  151. tracks/3/interp = 1
  152. tracks/3/loop_wrap = true
  153. tracks/3/keys = {
  154. "times": PackedFloat32Array(0, 0.5),
  155. "transitions": PackedFloat32Array(1, 1),
  156. "update": 0,
  157. "values": [0.0, 1.0]
  158. }
  159. tracks/4/type = "value"
  160. tracks/4/imported = false
  161. tracks/4/enabled = true
  162. tracks/4/path = NodePath("GlowSprite:visible")
  163. tracks/4/interp = 1
  164. tracks/4/loop_wrap = true
  165. tracks/4/keys = {
  166. "times": PackedFloat32Array(0, 0.5),
  167. "transitions": PackedFloat32Array(1, 1),
  168. "update": 1,
  169. "values": [true, false]
  170. }
  171. [sub_resource type="AnimationLibrary" id="AnimationLibrary_7v453"]
  172. _data = {
  173. "RESET": SubResource("Animation_r4jod"),
  174. "spin": SubResource("3"),
  175. "take": SubResource("4")
  176. }
  177. [sub_resource type="SphereShape3D" id="5"]
  178. radius = 0.375
  179. [sub_resource type="StandardMaterial3D" id="6"]
  180. transparency = 1
  181. blend_mode = 1
  182. shading_mode = 0
  183. vertex_color_use_as_albedo = true
  184. vertex_color_is_srgb = true
  185. albedo_color = Color(1, 1, 0.759137, 1)
  186. albedo_texture = ExtResource("3")
  187. texture_filter = 4
  188. billboard_mode = 3
  189. billboard_keep_scale = true
  190. particles_anim_h_frames = 1
  191. particles_anim_v_frames = 1
  192. particles_anim_loop = false
  193. proximity_fade_enabled = true
  194. proximity_fade_distance = 0.5
  195. [sub_resource type="PlaneMesh" id="7"]
  196. material = SubResource("6")
  197. size = Vector2(0.25, 0.25)
  198. orientation = 2
  199. [sub_resource type="Curve" id="Curve_b7uxi"]
  200. _data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.101562, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
  201. point_count = 3
  202. [sub_resource type="Gradient" id="8"]
  203. colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0)
  204. [node name="Coin" type="Area3D"]
  205. input_ray_pickable = false
  206. script = ExtResource("1")
  207. [node name="Circle" type="MeshInstance3D" parent="."]
  208. transform = Transform3D(1, 0, 0, 0, -3.61999e-06, -1, 0, 1, -3.61999e-06, 0.00550658, 0.532125, 0.000651598)
  209. layers = 2
  210. mesh = SubResource("CylinderMesh_fpglg")
  211. surface_material_override/0 = ExtResource("2_n0rbc")
  212. [node name="GlowSprite" type="MeshInstance3D" parent="."]
  213. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
  214. visibility_range_begin = 3.0
  215. visibility_range_begin_margin = 3.0
  216. visibility_range_fade_mode = 1
  217. mesh = SubResource("QuadMesh_kqa4x")
  218. surface_material_override/0 = SubResource("StandardMaterial3D_7q0mq")
  219. [node name="Animation" type="AnimationPlayer" parent="."]
  220. autoplay = "spin"
  221. libraries = {
  222. "": SubResource("AnimationLibrary_7v453")
  223. }
  224. [node name="CollisionShape3D" type="CollisionShape3D" parent="."]
  225. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00894194, 0.575859, 0.0193955)
  226. shape = SubResource("5")
  227. [node name="Sound" type="AudioStreamPlayer3D" parent="."]
  228. stream = ExtResource("2")
  229. [node name="CPUParticles3D" type="CPUParticles3D" parent="."]
  230. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.000732422, 0.542954, 0)
  231. emitting = false
  232. amount = 16
  233. one_shot = true
  234. explosiveness = 1.0
  235. lifetime_randomness = 0.2
  236. mesh = SubResource("7")
  237. emission_shape = 2
  238. emission_sphere_radius = 0.4
  239. direction = Vector3(0, 1, 0)
  240. spread = 25.0
  241. initial_velocity_min = 1.0
  242. initial_velocity_max = 2.0
  243. scale_amount_curve = SubResource("Curve_b7uxi")
  244. color_ramp = SubResource("8")
  245. [connection signal="body_entered" from="." to="." method="_on_coin_body_enter"]