godot-shooter / godot-4-testing / files / Explosion.tscn
Branch godot-4-testing · default branch · all branches
Explosion.tscn
| 1 | [gd_scene load_steps=8 format=3 uid="uid://7n7h5a6v4aq7"] |
| 2 | |
| 3 | [ext_resource type="Texture2D" uid="uid://b7wl2abxsq5ep" path="res://kenney_simple-space/PNG/Default/star_small.png" id="1"] |
| 4 | [ext_resource type="Script" path="res://Explosion.gd" id="2"] |
| 5 | |
| 6 | [sub_resource type="Gradient" id="4"] |
| 7 | offsets = PackedFloat32Array(0, 0.941935, 1) |
| 8 | colors = PackedColorArray(1, 1, 1, 1, 1, 0.0580645, 0.0580645, 1, 1, 0, 0, 1) |
| 9 | |
| 10 | [sub_resource type="GradientTexture2D" id="5"] |
| 11 | gradient = SubResource("4") |
| 12 | |
| 13 | [sub_resource type="Curve" id="1"] |
| 14 | _data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] |
| 15 | point_count = 2 |
| 16 | |
| 17 | [sub_resource type="CurveTexture" id="2"] |
| 18 | curve = SubResource("1") |
| 19 | |
| 20 | [sub_resource type="ParticleProcessMaterial" id="3"] |
| 21 | spread = 180.0 |
| 22 | gravity = Vector3(0, 0, 0) |
| 23 | initial_velocity_min = 40.0 |
| 24 | initial_velocity_max = 200.0 |
| 25 | scale_curve = SubResource("2") |
| 26 | color_ramp = SubResource("5") |
| 27 | |
| 28 | [node name="Explosion" type="GPUParticles2D"] |
| 29 | amount = 100 |
| 30 | process_material = SubResource("3") |
| 31 | texture = ExtResource("1") |
| 32 | lifetime = 0.7 |
| 33 | explosiveness = 1.0 |
| 34 | script = ExtResource("2") |
| 35 | |
| 36 | [node name="Timer" type="Timer" parent="."] |
| 37 | wait_time = 0.5 |
| 38 | one_shot = true |
| 39 | autostart = true |
| 40 | |
| 41 | [connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"] |