bomb.tscn 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. [gd_scene load_steps=9 format=3 uid="uid://enwoaqi0rnei"]
  2. [ext_resource type="Script" path="res://bomb.gd" id="1"]
  3. [ext_resource type="Texture2D" uid="uid://bdomqql6y50po" path="res://brickfloor.png" id="2"]
  4. [ext_resource type="Texture2D" uid="uid://drfbkdqmj0gu2" path="res://explosion.png" id="3"]
  5. [sub_resource type="RectangleShape2D" id="RectangleShape2D_1ih13"]
  6. size = Vector2(16, 192)
  7. [sub_resource type="RectangleShape2D" id="RectangleShape2D_whso6"]
  8. size = Vector2(192, 16)
  9. [sub_resource type="Curve" id="Curve_4yges"]
  10. max_value = 2.0
  11. _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]
  12. point_count = 4
  13. [sub_resource type="Animation" id="Animation_21j5c"]
  14. length = 4.0
  15. tracks/0/type = "value"
  16. tracks/0/imported = false
  17. tracks/0/enabled = true
  18. tracks/0/path = NodePath("Sprite:self_modulate")
  19. tracks/0/interp = 1
  20. tracks/0/loop_wrap = true
  21. tracks/0/keys = {
  22. "times": PackedFloat32Array(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),
  23. "transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
  24. "update": 0,
  25. "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)]
  26. }
  27. tracks/1/type = "method"
  28. tracks/1/imported = false
  29. tracks/1/enabled = true
  30. tracks/1/path = NodePath(".")
  31. tracks/1/interp = 1
  32. tracks/1/loop_wrap = true
  33. tracks/1/keys = {
  34. "times": PackedFloat32Array(2.8, 3.4),
  35. "transitions": PackedFloat32Array(1, 1),
  36. "values": [{
  37. "args": [],
  38. "method": &"explode"
  39. }, {
  40. "args": [],
  41. "method": &"done"
  42. }]
  43. }
  44. tracks/2/type = "value"
  45. tracks/2/imported = false
  46. tracks/2/enabled = true
  47. tracks/2/path = NodePath("Explosion1:emitting")
  48. tracks/2/interp = 1
  49. tracks/2/loop_wrap = true
  50. tracks/2/keys = {
  51. "times": PackedFloat32Array(0, 2.8),
  52. "transitions": PackedFloat32Array(1, 1),
  53. "update": 1,
  54. "values": [false, true]
  55. }
  56. tracks/3/type = "value"
  57. tracks/3/imported = false
  58. tracks/3/enabled = true
  59. tracks/3/path = NodePath("Explosion2:emitting")
  60. tracks/3/interp = 1
  61. tracks/3/loop_wrap = true
  62. tracks/3/keys = {
  63. "times": PackedFloat32Array(0, 2.8),
  64. "transitions": PackedFloat32Array(1, 1),
  65. "update": 1,
  66. "values": [false, true]
  67. }
  68. [sub_resource type="AnimationLibrary" id="AnimationLibrary_h2w7m"]
  69. _data = {
  70. "anim": SubResource("Animation_21j5c")
  71. }
  72. [node name="Bomb" type="Area2D"]
  73. monitorable = false
  74. script = ExtResource("1")
  75. [node name="Sprite" type="Sprite2D" parent="."]
  76. self_modulate = Color(1, 1, 1, 0)
  77. position = Vector2(-2.92606, -2.92606)
  78. texture = ExtResource("2")
  79. region_enabled = true
  80. region_rect = Rect2(144, 0, 48, 48)
  81. [node name="Shape1" type="CollisionShape2D" parent="."]
  82. shape = SubResource("RectangleShape2D_1ih13")
  83. [node name="Shape2" type="CollisionShape2D" parent="."]
  84. shape = SubResource("RectangleShape2D_whso6")
  85. [node name="Explosion1" type="CPUParticles2D" parent="."]
  86. emitting = false
  87. lifetime = 0.5
  88. one_shot = true
  89. explosiveness = 0.95
  90. texture = ExtResource("3")
  91. emission_shape = 3
  92. emission_rect_extents = Vector2(80, 1)
  93. gravity = Vector2(0, 0)
  94. initial_velocity_min = 1.0
  95. initial_velocity_max = 1.0
  96. angular_velocity_min = 187.35
  97. angular_velocity_max = 188.35
  98. scale_amount_curve = SubResource("Curve_4yges")
  99. [node name="Explosion2" type="CPUParticles2D" parent="."]
  100. rotation = 1.57162
  101. emitting = false
  102. lifetime = 0.5
  103. one_shot = true
  104. explosiveness = 0.95
  105. texture = ExtResource("3")
  106. emission_shape = 3
  107. emission_rect_extents = Vector2(80, 1)
  108. gravity = Vector2(0, 0)
  109. initial_velocity_min = 1.0
  110. initial_velocity_max = 1.0
  111. angular_velocity_min = 187.35
  112. angular_velocity_max = 188.35
  113. scale_amount_curve = SubResource("Curve_4yges")
  114. [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
  115. autoplay = "anim"
  116. libraries = {
  117. "": SubResource("AnimationLibrary_h2w7m")
  118. }
  119. [connection signal="body_entered" from="." to="." method="_on_bomb_body_enter"]
  120. [connection signal="body_exited" from="." to="." method="_on_bomb_body_exit"]