bomb.tscn 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. [gd_scene load_steps=10 format=2]
  2. [ext_resource path="res://bomb.gd" type="Script" id=1]
  3. [ext_resource path="res://brickfloor.png" type="Texture" id=2]
  4. [ext_resource path="res://explosion.png" type="Texture" id=3]
  5. [sub_resource type="RectangleShape2D" id=1]
  6. custom_solver_bias = 0.0
  7. extents = Vector2( 8, 96 )
  8. [sub_resource type="RectangleShape2D" id=2]
  9. custom_solver_bias = 0.0
  10. extents = Vector2( 96, 8 )
  11. [sub_resource type="Curve" id=3]
  12. min_value = 0.0
  13. max_value = 2.0
  14. bake_resolution = 100
  15. _data = [ Vector2( 0.00150494, 0.398437 ), 0.0, 0.0, 0, 0, Vector2( 0.0152287, 1.42969 ), 0.0, 0.0, 0, 0, Vector2( 0.478607, 1.30078 ), 0.0, 0.0, 0, 0, Vector2( 1, 0.291016 ), 0.0, 0.0, 0, 0 ]
  16. [sub_resource type="CurveTexture" id=4]
  17. flags = 4
  18. width = 2048
  19. curve = SubResource( 3 )
  20. [sub_resource type="ParticlesMaterial" id=5]
  21. render_priority = 0
  22. trail_divisor = 1
  23. emission_shape = 2
  24. emission_box_extents = Vector3( 80, 1, 1 )
  25. flag_align_y = false
  26. flag_rotate_y = false
  27. flag_disable_z = true
  28. spread = 45.0
  29. flatness = 0.0
  30. gravity = Vector3( 0, 0, 0 )
  31. initial_velocity = 1.0
  32. initial_velocity_random = 0.0
  33. angular_velocity = 187.85
  34. angular_velocity_random = 1.0
  35. orbit_velocity = 0.0
  36. orbit_velocity_random = 0.0
  37. linear_accel = 0.0
  38. linear_accel_random = 0.0
  39. radial_accel = 0.0
  40. radial_accel_random = 0.0
  41. tangential_accel = 0.0
  42. tangential_accel_random = 0.0
  43. damping = 0.0
  44. damping_random = 0.0
  45. angle = 0.0
  46. angle_random = 0.0
  47. scale = 1.0
  48. scale_random = 0.0
  49. scale_curve = SubResource( 4 )
  50. color = Color( 1, 1, 1, 1 )
  51. hue_variation = 0.0
  52. hue_variation_random = 0.0
  53. anim_speed = 0.0
  54. anim_speed_random = 0.0
  55. anim_offset = 0.0
  56. anim_offset_random = 0.0
  57. anim_loop = false
  58. _sections_unfolded = [ "Angular Velocity", "Emission Shape", "Gravity", "Scale" ]
  59. [sub_resource type="Animation" id=6]
  60. length = 4.0
  61. loop = false
  62. step = 0.1
  63. tracks/0/type = "value"
  64. tracks/0/path = NodePath("sprite:self_modulate")
  65. tracks/0/interp = 1
  66. tracks/0/loop_wrap = true
  67. tracks/0/imported = false
  68. tracks/0/enabled = true
  69. tracks/0/keys = {
  70. "times": PoolRealArray( 0, 0.4, 0.6, 0.8, 1.1, 1.3, 1.5, 1.8, 1.9, 2, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 3 ),
  71. "transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ),
  72. "update": 0,
  73. "values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ), Color( 8, 8, 8, 1 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ), Color( 8, 8, 8, 1 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ), Color( 8, 8, 8, 1 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ), Color( 8, 8, 8, 1 ), Color( 1, 1, 1, 1 ), Color( 8, 8, 8, 1 ), Color( 1, 1, 1, 1 ), Color( 8, 8, 8, 1 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ]
  74. }
  75. tracks/1/type = "method"
  76. tracks/1/path = NodePath(".")
  77. tracks/1/interp = 1
  78. tracks/1/loop_wrap = true
  79. tracks/1/imported = false
  80. tracks/1/enabled = true
  81. tracks/1/keys = {
  82. "times": PoolRealArray( 2.8, 3.4 ),
  83. "transitions": PoolRealArray( 1, 1 ),
  84. "values": [ {
  85. "args": [ ],
  86. "method": "explode"
  87. }, {
  88. "args": [ ],
  89. "method": "done"
  90. } ]
  91. }
  92. tracks/2/type = "value"
  93. tracks/2/path = NodePath("explosion1:emitting")
  94. tracks/2/interp = 1
  95. tracks/2/loop_wrap = true
  96. tracks/2/imported = false
  97. tracks/2/enabled = true
  98. tracks/2/keys = {
  99. "times": PoolRealArray( 0, 2.8 ),
  100. "transitions": PoolRealArray( 1, 1 ),
  101. "update": 1,
  102. "values": [ false, true ]
  103. }
  104. tracks/3/type = "value"
  105. tracks/3/path = NodePath("explosion2:emitting")
  106. tracks/3/interp = 1
  107. tracks/3/loop_wrap = true
  108. tracks/3/imported = false
  109. tracks/3/enabled = true
  110. tracks/3/keys = {
  111. "times": PoolRealArray( 0, 2.8 ),
  112. "transitions": PoolRealArray( 1, 1 ),
  113. "update": 1,
  114. "values": [ false, true ]
  115. }
  116. [node name="bomb" type="Area2D"]
  117. input_pickable = true
  118. gravity_vec = Vector2( 0, 1 )
  119. gravity = 98.0
  120. linear_damp = 0.1
  121. angular_damp = 1.0
  122. audio_bus_override = false
  123. audio_bus_name = "Master"
  124. script = ExtResource( 1 )
  125. [node name="sprite" type="Sprite" parent="." index="0"]
  126. position = Vector2( -2.92606, -2.92606 )
  127. texture = ExtResource( 2 )
  128. region_enabled = true
  129. region_rect = Rect2( 144, 0, 48, 48 )
  130. _sections_unfolded = [ "Region" ]
  131. [node name="shape1" type="CollisionShape2D" parent="." index="1"]
  132. shape = SubResource( 1 )
  133. [node name="shape2" type="CollisionShape2D" parent="." index="2"]
  134. shape = SubResource( 2 )
  135. [node name="explosion1" type="Particles2D" parent="." index="3"]
  136. emitting = false
  137. amount = 8
  138. lifetime = 0.5
  139. one_shot = true
  140. preprocess = 0.0
  141. speed_scale = 1.0
  142. explosiveness = 0.95
  143. randomness = 0.0
  144. fixed_fps = 0
  145. fract_delta = true
  146. visibility_rect = Rect2( -100, -100, 200, 200 )
  147. local_coords = true
  148. draw_order = 0
  149. process_material = SubResource( 5 )
  150. texture = ExtResource( 3 )
  151. normal_map = null
  152. h_frames = 1
  153. v_frames = 1
  154. _sections_unfolded = [ "Process Material", "Textures", "Time" ]
  155. [node name="explosion2" type="Particles2D" parent="." index="4"]
  156. rotation = 1.57162
  157. emitting = false
  158. amount = 8
  159. lifetime = 1.0
  160. one_shot = true
  161. preprocess = 0.0
  162. speed_scale = 1.0
  163. explosiveness = 0.95
  164. randomness = 0.0
  165. fixed_fps = 0
  166. fract_delta = true
  167. visibility_rect = Rect2( -100, -100, 200, 200 )
  168. local_coords = true
  169. draw_order = 0
  170. process_material = SubResource( 5 )
  171. texture = ExtResource( 3 )
  172. normal_map = null
  173. h_frames = 1
  174. v_frames = 1
  175. _sections_unfolded = [ "Process Material", "Textures", "Time" ]
  176. [node name="anim" type="AnimationPlayer" parent="." index="5"]
  177. root_node = NodePath("..")
  178. autoplay = "anim"
  179. playback_process_mode = 1
  180. playback_default_blend_time = 0.0
  181. playback_speed = 1.0
  182. anims/anim = SubResource( 6 )
  183. blend_times = [ ]
  184. autoplay = "anim"
  185. [connection signal="body_entered" from="." to="." method="_on_bomb_body_enter"]
  186. [connection signal="body_exited" from="." to="." method="_on_bomb_body_exit"]