[gd_scene load_steps=10 format=1]

[ext_resource path="res://colors/ramp_asteroid.tres" type="ColorRamp" id=1]
[ext_resource path="res://colors/smoke.tres" type="ColorRamp" id=2]
[ext_resource path="res://sprites/under.png" type="Texture" id=3]
[ext_resource path="res://scripts/explosion.gd" type="Script" id=4]

[sub_resource type="GDScript" id=1]

script/source = "extends Particles2D

func _ready():
	set_emitting(true)
"

[sub_resource type="GDScript" id=2]

script/source = "extends Particles2D

func _ready():
	set_emitting(true)
"

[sub_resource type="Animation" id=3]

resource/name = "flash"
length = 0.4
loop = false
step = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath(".:transform/scale")
tracks/0/interp = 1
tracks/0/imported = false
tracks/0/keys = {
"times": FloatArray( 0, 0.1, 0.3 ),
"transitions": FloatArray( 1, -4, 1 ),
"update": 0,
"values": [ Vector2( 0.05, 0.05 ), Vector2( 0.3, 0.3 ), Vector2( 1e-05, 1e-05 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath(".:transform/rot")
tracks/1/interp = 1
tracks/1/imported = false
tracks/1/keys = {
"times": FloatArray( 0, 0.3 ),
"transitions": FloatArray( 1, 1 ),
"update": 0,
"values": [ 180.0, 0.0 ]
}
tracks/2/type = "value"
tracks/2/path = NodePath(".:modulate")
tracks/2/interp = 1
tracks/2/imported = false
tracks/2/keys = {
"times": FloatArray( 0, 0.1, 0.3 ),
"transitions": FloatArray( 1, 1, 1 ),
"update": 0,
"values": [ Color( 0.0470588, 0.0470588, 0.0470588, 1 ), Color( 0.83606, 1, 0.382812, 1 ), Color( 1, 0, 0.046875, 1 ) ]
}

[sub_resource type="Animation" id=4]

resource/name = "flash_counter"
length = 0.4
loop = false
step = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath(".:transform/scale")
tracks/0/interp = 1
tracks/0/imported = false
tracks/0/keys = {
"times": FloatArray( 0, 0.1, 0.3 ),
"transitions": FloatArray( 1, 1, 1 ),
"update": 0,
"values": [ Vector2( 0.05, 0.05 ), Vector2( 0.3, 0.3 ), Vector2( 1e-05, 1e-05 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath(".:transform/rot")
tracks/1/interp = 1
tracks/1/imported = false
tracks/1/keys = {
"times": FloatArray( 0, 0.3 ),
"transitions": FloatArray( 1, 1 ),
"update": 0,
"values": [ 0.0, 180.0 ]
}
tracks/2/type = "value"
tracks/2/path = NodePath(".:modulate")
tracks/2/interp = 1
tracks/2/imported = false
tracks/2/keys = {
"times": FloatArray( 0, 0.1, 0.3 ),
"transitions": FloatArray( 1, 1, 1 ),
"update": 0,
"values": [ Color( 0.0470588, 0.0470588, 0.0470588, 1 ), Color( 0.83606, 1, 0.382812, 1 ), Color( 1, 0, 0.046875, 1 ) ]
}

[sub_resource type="CircleShape2D" id=5]

custom_solver_bias = 0.0
radius = 77.0607

[node name="Explosion" type="Particles2D"]

config/amount = 1024
config/lifetime = 2.0
config/emit_timeout = 0.1
config/emitting = false
config/process_mode = 1
params/direction = 0.0
params/spread = 180.0
params/linear_velocity = 50.0
params/spin_velocity = 20.0
params/orbit_velocity = 0.0
params/gravity_direction = 0.0
params/gravity_strength = 9.8
params/radial_accel = 0.0
params/tangential_accel = 0.0
params/damping = 50.0
params/initial_angle = 0.0
params/initial_size = 2.0
params/final_size = 0.0
params/hue_variation = 0.0
params/anim_speed_scale = 1.0
params/anim_initial_pos = 0.0
randomness/direction = 1.0
randomness/linear_velocity = 0.5
randomness/orbit_velocity = 0.5
randomness/final_size = 1.0
color/color_ramp = ExtResource( 1 )
script/script = SubResource( 1 )

[node name="Smoke" type="Particles2D" parent="."]

config/amount = 32
config/lifetime = 3.0
config/emit_timeout = 0.5
config/emitting = false
config/process_mode = 1
config/half_extents = Vector2( 2, 2 )
params/direction = 180.0
params/spread = 90.0
params/linear_velocity = 5.0
params/spin_velocity = 0.0
params/orbit_velocity = 0.0
params/gravity_direction = 180.0
params/gravity_strength = 2.0
params/radial_accel = 0.0
params/tangential_accel = 0.0
params/damping = 0.0
params/initial_angle = 0.0
params/initial_size = 1.0
params/final_size = 5.0
params/hue_variation = 0.0
params/anim_speed_scale = 1.0
params/anim_initial_pos = 0.0
randomness/linear_velocity = 0.5
color/color_ramp = ExtResource( 2 )
script/script = SubResource( 2 )

[node name="Sprite1" type="Sprite" parent="."]

editor/display_folded = true
visibility/blend_mode = 1
transform/pos = Vector2( 0.0889397, 0.0746803 )
transform/rot = 120.0
transform/scale = Vector2( 0.3, 0.3 )
texture = ExtResource( 3 )
offset = Vector2( -4.4341, 11.1493 )
flip_h = true
flip_v = true
modulate = Color( 0.83606, 1, 0.382812, 1 )

[node name="AnimationPlayer" type="AnimationPlayer" parent="Sprite1"]

playback/process_mode = 1
playback/default_blend_time = 0.0
root/root = NodePath("..")
anims/flash = SubResource( 3 )
playback/active = true
playback/speed = 1.0
blend_times = [  ]
autoplay = "flash"

[node name="Sprite" type="Sprite" parent="."]

visibility/blend_mode = 1
transform/pos = Vector2( -0.0113325, -0.0332518 )
transform/scale = Vector2( 1e-05, 1e-05 )
texture = ExtResource( 3 )
offset = Vector2( 1.61146, -10.8665 )
modulate = Color( 1, 0, 0.046875, 1 )
script/script = ExtResource( 4 )

[node name="AnimationPlayer" type="AnimationPlayer" parent="Sprite"]

playback/process_mode = 1
playback/default_blend_time = 0.0
root/root = NodePath("..")
anims/flash = SubResource( 3 )
anims/flash_counter = SubResource( 4 )
playback/active = true
playback/speed = 1.0
blend_times = [  ]
autoplay = "flash_counter"

[node name="ExplosionArea" type="Area2D" parent="Sprite"]

input/pickable = true
shapes/0/shape = SubResource( 5 )
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
shapes/0/trigger = false
gravity_vec = Vector2( 0, 1 )
gravity = 98.0
linear_damp = 0.1
angular_damp = 1.0

[node name="CollisionShape2D" type="CollisionShape2D" parent="Sprite/ExplosionArea"]

shape = SubResource( 5 )
trigger = false
_update_shape_index = 0


