Add explosion effect to explosive component and implement cleanup functionality
This commit is contained in:
52
objects/explosion_fx.tscn
Normal file
52
objects/explosion_fx.tscn
Normal file
@@ -0,0 +1,52 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://dyp4i4ru2j2jh"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/components/cleanup_component.gd" id="1_8uvxg"]
|
||||
|
||||
[sub_resource type="Curve" id="Curve_8umf8"]
|
||||
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0.4), 0.0, 0.0, 0, 0]
|
||||
point_count = 2
|
||||
|
||||
[sub_resource type="CurveTexture" id="CurveTexture_w18ti"]
|
||||
curve = SubResource("Curve_8umf8")
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_5woy1"]
|
||||
offsets = PackedFloat32Array(0, 0.173759, 0.521277, 0.687943, 0.886525, 1)
|
||||
colors = PackedColorArray(0.635294, 0.188235, 0, 1, 0.890196, 0.317647, 0, 1, 1, 0.470588, 0.188235, 1, 1, 0.635294, 0, 1, 1, 0.858824, 0.635294, 1, 1, 1, 1, 0.501961)
|
||||
|
||||
[sub_resource type="GradientTexture1D" id="GradientTexture1D_f0o3s"]
|
||||
gradient = SubResource("Gradient_5woy1")
|
||||
|
||||
[sub_resource type="Curve" id="Curve_0bqc3"]
|
||||
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0.1), 0.0, 0.0, 0, 0]
|
||||
point_count = 2
|
||||
|
||||
[sub_resource type="CurveTexture" id="CurveTexture_w0m05"]
|
||||
curve = SubResource("Curve_0bqc3")
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_1ujje"]
|
||||
particle_flag_disable_z = true
|
||||
emission_shape_scale = Vector3(0.5, 0.5, 0.5)
|
||||
spread = 180.0
|
||||
initial_velocity_min = 32.0
|
||||
initial_velocity_max = 32.0
|
||||
angular_velocity_min = 41.62
|
||||
angular_velocity_max = 41.62
|
||||
gravity = Vector3(0, 0, 0)
|
||||
scale_curve = SubResource("CurveTexture_w0m05")
|
||||
color_ramp = SubResource("GradientTexture1D_f0o3s")
|
||||
alpha_curve = SubResource("CurveTexture_w18ti")
|
||||
|
||||
[node name="ExplosionFX" type="GPUParticles2D"]
|
||||
emitting = false
|
||||
amount = 2048
|
||||
process_material = SubResource("ParticleProcessMaterial_1ujje")
|
||||
lifetime = 0.5
|
||||
one_shot = true
|
||||
explosiveness = 1.0
|
||||
fixed_fps = 24
|
||||
|
||||
[node name="CleanUpComponent" type="Node" parent="." node_paths=PackedStringArray("root")]
|
||||
script = ExtResource("1_8uvxg")
|
||||
root = NodePath("..")
|
||||
|
||||
[connection signal="finished" from="." to="CleanUpComponent" method="clean_up"]
|
Reference in New Issue
Block a user