[gd_scene load_steps=6 format=2]

[ext_resource path="res://sprites/particles/explossion.png" type="Texture" id=1]
[ext_resource path="res://scripts/explossion.gd" type="Script" id=2]

[sub_resource type="Gradient" id=1]
offsets = PoolRealArray( 0, 0.452297 )
colors = PoolColorArray( 1, 1, 1, 1, 1, 1, 1, 0 )

[sub_resource type="Animation" id=2]
resource_name = "emit"
length = 2.0
tracks/0/type = "value"
tracks/0/path = NodePath("Particles2D:emitting")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
tracks/1/type = "method"
tracks/1/path = NodePath(".")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 1 ),
"transitions": PoolRealArray( 1 ),
"values": [ {
"args": [  ],
"method": "queue_free"
} ]
}

[sub_resource type="CircleShape2D" id=3]
radius = 88.3629

[node name="explossion" type="Area2D"]
monitorable = false
collision_layer = 2
collision_mask = 2147483648
script = ExtResource( 2 )

[node name="Particles2D" type="CPUParticles2D" parent="."]
emitting = false
lifetime = 0.4
one_shot = true
explosiveness = 0.2
texture = ExtResource( 1 )
emission_shape = 1
emission_sphere_radius = 128.0
scale_amount = 2.0
color_ramp = SubResource( 1 )

[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
autoplay = "emit"
anims/emit = SubResource( 2 )

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 3 )

[node name="Timer" type="Timer" parent="."]
wait_time = 0.4
one_shot = true
autostart = true
[connection signal="body_entered" from="." to="." method="_on_explossion_body_entered"]
[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_AnimationPlayer_animation_finished"]
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]
