bullet.tscn 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. [gd_scene load_steps=9 format=2]
  2. [ext_resource path="res://bullet.gd" type="Script" id=1]
  3. [ext_resource path="res://bullet.png" type="Texture" id=2]
  4. [sub_resource type="CanvasItemMaterial" id=1]
  5. render_priority = 0
  6. blend_mode = 0
  7. light_mode = 0
  8. [sub_resource type="CanvasItemMaterial" id=8]
  9. render_priority = 0
  10. blend_mode = 1
  11. light_mode = 0
  12. [sub_resource type="ParticlesMaterial" id=7]
  13. render_priority = 0
  14. trail_divisor = 1
  15. emission_shape = 0
  16. flag_align_y = false
  17. flag_rotate_y = false
  18. flag_disable_z = true
  19. spread = 0.0
  20. flatness = 0.0
  21. gravity = Vector3( 0, 0, 0 )
  22. initial_velocity = 0.0
  23. initial_velocity_random = 0.0
  24. angular_velocity = 0.0
  25. angular_velocity_random = 0.0
  26. orbit_velocity = 0.0
  27. orbit_velocity_random = 0.0
  28. linear_accel = 0.0
  29. linear_accel_random = 0.0
  30. radial_accel = 0.0
  31. radial_accel_random = 0.0
  32. tangential_accel = 0.0
  33. tangential_accel_random = 0.0
  34. damping = 0.0
  35. damping_random = 0.0
  36. angle = 0.0
  37. angle_random = 0.0
  38. scale = 0.8
  39. scale_random = 0.0
  40. color = Color( 1, 1, 1, 0.705882 )
  41. hue_variation = 0.0
  42. hue_variation_random = 0.0
  43. anim_speed = 0.0
  44. anim_speed_random = 0.0
  45. anim_offset = 0.0
  46. anim_offset_random = 0.0
  47. anim_loop = false
  48. _sections_unfolded = [ "Color", "Trail" ]
  49. [sub_resource type="CanvasItemMaterial" id=4]
  50. render_priority = 0
  51. blend_mode = 0
  52. light_mode = 0
  53. [sub_resource type="CircleShape2D" id=5]
  54. custom_solver_bias = 0.0
  55. radius = 10.0
  56. [sub_resource type="Animation" id=6]
  57. length = 1.5
  58. loop = false
  59. step = 0.1
  60. tracks/0/type = "method"
  61. tracks/0/path = NodePath(".")
  62. tracks/0/interp = 1
  63. tracks/0/loop_wrap = true
  64. tracks/0/imported = false
  65. tracks/0/enabled = true
  66. tracks/0/keys = {
  67. "times": PoolRealArray( 1.31 ),
  68. "transitions": PoolRealArray( 1 ),
  69. "values": [ {
  70. "args": [ ],
  71. "method": "queue_free"
  72. } ]
  73. }
  74. tracks/1/type = "value"
  75. tracks/1/path = NodePath("sprite:self_modulate")
  76. tracks/1/interp = 1
  77. tracks/1/loop_wrap = true
  78. tracks/1/imported = false
  79. tracks/1/enabled = true
  80. tracks/1/keys = {
  81. "times": PoolRealArray( 0, 1 ),
  82. "transitions": PoolRealArray( 1, 1 ),
  83. "update": 0,
  84. "values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ]
  85. }
  86. tracks/2/type = "value"
  87. tracks/2/path = NodePath("Particles2D:self_modulate")
  88. tracks/2/interp = 1
  89. tracks/2/loop_wrap = true
  90. tracks/2/imported = false
  91. tracks/2/enabled = true
  92. tracks/2/keys = {
  93. "times": PoolRealArray( 0, 0.5 ),
  94. "transitions": PoolRealArray( 1, 1 ),
  95. "update": 0,
  96. "values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ]
  97. }
  98. [node name="bullet" type="RigidBody2D" index="0"]
  99. material = SubResource( 1 )
  100. input_pickable = false
  101. collision_layer = 1
  102. collision_mask = 1
  103. mode = 0
  104. mass = 1.0
  105. friction = 1.0
  106. bounce = 0.0
  107. gravity_scale = 1.0
  108. custom_integrator = false
  109. continuous_cd = 2
  110. contacts_reported = 1
  111. contact_monitor = true
  112. sleeping = false
  113. can_sleep = true
  114. linear_velocity = Vector2( 0, 0 )
  115. linear_damp = -1.0
  116. angular_velocity = 0.0
  117. angular_damp = -1.0
  118. script = ExtResource( 1 )
  119. _sections_unfolded = [ "Angular", "Collision", "Linear", "Material", "Pickable", "Transform", "Visibility", "Z" ]
  120. [node name="Particles2D" type="Particles2D" parent="." index="0"]
  121. material = SubResource( 8 )
  122. emitting = true
  123. amount = 8
  124. lifetime = 0.3
  125. one_shot = false
  126. preprocess = 0.0
  127. speed_scale = 3.0
  128. explosiveness = 0.0
  129. randomness = 0.0
  130. fixed_fps = 0
  131. fract_delta = true
  132. visibility_rect = Rect2( -100, -100, 200, 200 )
  133. local_coords = false
  134. draw_order = 0
  135. process_material = SubResource( 7 )
  136. texture = ExtResource( 2 )
  137. normal_map = null
  138. h_frames = 1
  139. v_frames = 1
  140. _sections_unfolded = [ "Drawing", "Process Material", "Time", "Visibility" ]
  141. [node name="sprite" type="Sprite" parent="." index="1"]
  142. material = SubResource( 4 )
  143. texture = ExtResource( 2 )
  144. _sections_unfolded = [ "Animation", "Material", "Offset", "Region", "Transform", "Visibility", "Z" ]
  145. [node name="CollisionShape2D" type="CollisionShape2D" parent="." index="2"]
  146. shape = SubResource( 5 )
  147. _sections_unfolded = [ "Material", "Transform", "Visibility", "Z" ]
  148. [node name="Timer" type="Timer" parent="." index="3"]
  149. process_mode = 1
  150. wait_time = 1.0
  151. one_shot = true
  152. autostart = true
  153. [node name="anim" type="AnimationPlayer" parent="." index="4"]
  154. playback_process_mode = 1
  155. playback_default_blend_time = 0.0
  156. root_node = NodePath("..")
  157. anims/shutdown = SubResource( 6 )
  158. playback/active = true
  159. playback/speed = 1.0
  160. blend_times = [ ]
  161. autoplay = ""
  162. [connection signal="body_entered" from="." to="." method="_on_bullet_body_enter"]
  163. [connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]