coin.tscn 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. [gd_scene load_steps=11 format=2]
  2. [ext_resource path="res://coin.gd" type="Script" id=1]
  3. [ext_resource path="res://coin.png" type="Texture" id=2]
  4. [ext_resource path="res://sound_coin.wav" type="AudioStream" id=3]
  5. [ext_resource path="res://bullet.png" type="Texture" id=4]
  6. [sub_resource type="Animation" id=1]
  7. resource_name = "spin"
  8. length = 1.5
  9. loop = true
  10. step = 0.25
  11. tracks/0/type = "value"
  12. tracks/0/path = NodePath("sprite:frame")
  13. tracks/0/interp = 1
  14. tracks/0/loop_wrap = true
  15. tracks/0/imported = false
  16. tracks/0/keys = {
  17. "times": PoolRealArray( 0, 0.25, 0.5, 0.75, 1, 1.25, 1.5 ),
  18. "transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1 ),
  19. "update": 1,
  20. "values": [ 0, 1, 2, 3, 2, 1, 0 ]
  21. }
  22. [sub_resource type="Animation" id=2]
  23. length = 8.0
  24. loop = false
  25. step = 0.0
  26. tracks/0/type = "value"
  27. tracks/0/path = NodePath("sprite:frame")
  28. tracks/0/interp = 1
  29. tracks/0/loop_wrap = true
  30. tracks/0/imported = false
  31. tracks/0/keys = {
  32. "times": PoolRealArray( 0 ),
  33. "transitions": PoolRealArray( 1 ),
  34. "update": 0,
  35. "values": [ 0 ]
  36. }
  37. tracks/1/type = "method"
  38. tracks/1/path = NodePath(".")
  39. tracks/1/interp = 1
  40. tracks/1/loop_wrap = true
  41. tracks/1/imported = false
  42. tracks/1/keys = {
  43. "times": PoolRealArray( 2.7 ),
  44. "transitions": PoolRealArray( 1 ),
  45. "values": [ {
  46. "args": [ ],
  47. "method": "queue_free"
  48. } ]
  49. }
  50. tracks/2/type = "value"
  51. tracks/2/path = NodePath("particles:emitting")
  52. tracks/2/interp = 1
  53. tracks/2/loop_wrap = true
  54. tracks/2/imported = false
  55. tracks/2/keys = {
  56. "times": PoolRealArray( 0, 0.98 ),
  57. "transitions": PoolRealArray( 1, 1 ),
  58. "update": 1,
  59. "values": [ true, false ]
  60. }
  61. tracks/3/type = "value"
  62. tracks/3/path = NodePath("sprite:self_modulate")
  63. tracks/3/interp = 1
  64. tracks/3/loop_wrap = true
  65. tracks/3/imported = false
  66. tracks/3/keys = {
  67. "times": PoolRealArray( 0, 0.33 ),
  68. "transitions": PoolRealArray( 1, 1 ),
  69. "update": 0,
  70. "values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ]
  71. }
  72. tracks/4/type = "value"
  73. tracks/4/path = NodePath("sound:playing")
  74. tracks/4/interp = 1
  75. tracks/4/loop_wrap = true
  76. tracks/4/imported = false
  77. tracks/4/keys = {
  78. "times": PoolRealArray( 0.01 ),
  79. "transitions": PoolRealArray( 1 ),
  80. "update": 1,
  81. "values": [ true ]
  82. }
  83. [sub_resource type="CircleShape2D" id=3]
  84. custom_solver_bias = 0.0
  85. radius = 10.0
  86. [sub_resource type="CanvasItemMaterial" id=4]
  87. render_priority = 0
  88. blend_mode = 1
  89. light_mode = 0
  90. [sub_resource type="GradientTexture" id=5]
  91. width = 2048
  92. [sub_resource type="ParticlesMaterial" id=6]
  93. render_priority = 0
  94. trail_divisor = 1
  95. emission_shape = 1
  96. emission_sphere_radius = 10.0
  97. flag_align_y = false
  98. flag_rotate_y = false
  99. flag_disable_z = true
  100. spread = 45.0
  101. flatness = 0.0
  102. gravity = Vector3( 0, 90, 0 )
  103. initial_velocity = 121.98
  104. initial_velocity_random = 0.0
  105. angular_velocity = -2.49891e+38
  106. angular_velocity_random = 0.0
  107. orbit_velocity = 0.0
  108. orbit_velocity_random = 0.0
  109. linear_accel = 0.0
  110. linear_accel_random = 0.0
  111. radial_accel = 0.0
  112. radial_accel_random = 0.0
  113. tangential_accel = 0.0
  114. tangential_accel_random = 0.0
  115. damping = 0.0
  116. damping_random = 0.0
  117. angle = 0.0
  118. angle_random = 0.0
  119. scale = 0.2
  120. scale_random = 0.0
  121. color_ramp = SubResource( 5 )
  122. hue_variation = 0.0
  123. hue_variation_random = 0.0
  124. anim_speed = 0.0
  125. anim_speed_random = 0.0
  126. anim_offset = 0.0
  127. anim_offset_random = 0.0
  128. anim_loop = false
  129. [node name="coin" type="Area2D"]
  130. input_pickable = true
  131. gravity_vec = Vector2( 0, 1 )
  132. gravity = 98.0
  133. linear_damp = 0.1
  134. angular_damp = 1.0
  135. audio_bus_override = false
  136. audio_bus_name = "Master"
  137. script = ExtResource( 1 )
  138. [node name="sprite" type="Sprite" parent="."]
  139. texture = ExtResource( 2 )
  140. hframes = 4
  141. [node name="anim" type="AnimationPlayer" parent="."]
  142. playback_process_mode = 1
  143. playback_default_blend_time = 0.0
  144. root_node = NodePath("..")
  145. anims/spin = SubResource( 1 )
  146. anims/taken = SubResource( 2 )
  147. playback/active = true
  148. playback/speed = 3.0
  149. blend_times = [ ]
  150. autoplay = "spin"
  151. [node name="collision" type="CollisionShape2D" parent="."]
  152. shape = SubResource( 3 )
  153. [node name="sound" type="AudioStreamPlayer2D" parent="."]
  154. stream = ExtResource( 3 )
  155. volume_db = 0.0
  156. autoplay = false
  157. max_distance = 2000.0
  158. attenuation = 1.0
  159. bus = "Master"
  160. area_mask = 1
  161. [node name="particles" type="Particles2D" parent="."]
  162. material = SubResource( 4 )
  163. emitting = false
  164. amount = 8
  165. lifetime = 2.0
  166. one_shot = false
  167. preprocess = 0.0
  168. speed_scale = 1.0
  169. explosiveness = 1.0
  170. randomness = 0.0
  171. fixed_fps = 0
  172. fract_delta = true
  173. visibility_rect = Rect2( -100, -100, 200, 200 )
  174. local_coords = true
  175. draw_order = 65793
  176. process_material = SubResource( 6 )
  177. texture = ExtResource( 4 )
  178. normal_map = null
  179. h_frames = 1
  180. v_frames = 1
  181. [node name="enabler" type="VisibilityEnabler2D" parent="."]
  182. rect = Rect2( -10, -10, 20, 20 )
  183. pause_animations = true
  184. freeze_bodies = true
  185. pause_particles = false
  186. pause_animated_sprites = true
  187. process_parent = false
  188. physics_process_parent = false
  189. [connection signal="body_entered" from="." to="." method="_on_coin_body_enter"]