[gd_scene load_steps=12 format=2]

[ext_resource path="res://scripts/enemie_2.gd" type="Script" id=1]
[ext_resource path="res://sprites/enemie_2.png" type="Texture" id=2]
[ext_resource path="res://animations/part_damage.tres" type="Animation" id=3]
[ext_resource path="res://animations/damage.tres" type="Animation" id=4]
[ext_resource path="res://audio/sounds/shot_2.wav" type="AudioStream" id=5]
[ext_resource path="res://audio/sounds/hit_2.wav" type="AudioStream" id=6]

[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 7.5, 1 )

[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 1, 1.5 )

[sub_resource type="Animation" id=3]
resource_name = "destroy"
length = 0.48
loop = true
step = 0.08
tracks/0/type = "value"
tracks/0/path = NodePath("pol:color")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.32 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 1,
"values": [ Color( 0.827451, 0.827451, 0.196078, 1 ), Color( 1, 0.54902, 0, 1 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("pol:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( 0, -1 ) ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("pol:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0, 0.08, 0.16, 0.24, 0.32, 0.4 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ),
"update": 1,
"values": [ true, false, true, false, true, false ]
}

[sub_resource type="Animation" id=4]
resource_name = "destroy"
length = 0.4
tracks/0/type = "value"
tracks/0/path = NodePath("sprite:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.4 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 0, 0 ) ]
}

[sub_resource type="Animation" id=5]
length = 3.0
step = 0.2
tracks/0/type = "value"
tracks/0/path = NodePath(".:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.2, 0.4, 0.6, 0.8, 1, 1.2, 1.4, 1.6, 1.8, 2 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ),
"update": 1,
"values": [ Vector2( 16, -4 ), Vector2( 16, -3 ), Vector2( 16, -2 ), Vector2( 16, -1 ), Vector2( 16, 0 ), Vector2( 16, 1 ), Vector2( 16, 2 ), Vector2( 16, 3 ), Vector2( 16, 4 ), Vector2( 16, 5 ), Vector2( 16, 6 ) ]
}

[node name="enemie_2" type="Area2D"]
position = Vector2( 16, -4 )
monitorable = false
collision_mask = 0
script = ExtResource( 1 )

[node name="coll" type="CollisionShape2D" parent="."]
position = Vector2( 0.5, 0 )
shape = SubResource( 1 )

[node name="sprite" type="Sprite" parent="."]
texture = ExtResource( 2 )
offset = Vector2( 0.5, 0.5 )
flip_v = true

[node name="rapid_time" type="Timer" parent="."]
wait_time = 0.2
one_shot = true

[node name="bullet_time" type="Timer" parent="."]
wait_time = 0.6
one_shot = true

[node name="bullet_poses" type="Node2D" parent="."]

[node name="bullet_pos_0" type="Position2D" parent="bullet_poses"]
position = Vector2( -5, 2 )

[node name="bullet_pos_1" type="Position2D" parent="bullet_poses"]
position = Vector2( -2, 2 )

[node name="bullet_pos_2" type="Position2D" parent="bullet_poses"]
position = Vector2( 2, 2 )

[node name="bullet_pos_3" type="Position2D" parent="bullet_poses"]
position = Vector2( 5, 2 )

[node name="areas" type="Node2D" parent="."]

[node name="area_part_0" type="Area2D" parent="areas" groups=[
"damage",
]]
position = Vector2( -5, 0 )
monitoring = false
monitorable = false
collision_layer = 4
collision_mask = 0

[node name="coll" type="CollisionShape2D" parent="areas/area_part_0"]
position = Vector2( 0.5, 0.5 )
shape = SubResource( 2 )

[node name="pol" type="Polygon2D" parent="areas/area_part_0"]
polygon = PoolVector2Array( 0, -1, 0, 2, 1, 2, 1, -1 )

[node name="anim" type="AnimationPlayer" parent="areas/area_part_0"]
anims/destroy = SubResource( 3 )
anims/part_damage = ExtResource( 3 )

[node name="area_part_1" type="Area2D" parent="areas" groups=[
"damage",
]]
position = Vector2( -2, 0 )
monitoring = false
monitorable = false
collision_layer = 4
collision_mask = 0

[node name="coll" type="CollisionShape2D" parent="areas/area_part_1"]
position = Vector2( 0.5, 0.5 )
shape = SubResource( 2 )

[node name="pol" type="Polygon2D" parent="areas/area_part_1"]
polygon = PoolVector2Array( 0, -1, 0, 2, 1, 2, 1, -1 )

[node name="anim" type="AnimationPlayer" parent="areas/area_part_1"]
anims/destroy = SubResource( 3 )
anims/part_damage = ExtResource( 3 )

[node name="area_part_2" type="Area2D" parent="areas" groups=[
"damage",
]]
position = Vector2( 2, 0 )
monitoring = false
monitorable = false
collision_layer = 4
collision_mask = 0

[node name="coll" type="CollisionShape2D" parent="areas/area_part_2"]
position = Vector2( 0.5, 0.5 )
shape = SubResource( 2 )

[node name="pol" type="Polygon2D" parent="areas/area_part_2"]
polygon = PoolVector2Array( 0, -1, 0, 2, 1, 2, 1, -1 )

[node name="anim" type="AnimationPlayer" parent="areas/area_part_2"]
anims/destroy = SubResource( 3 )
anims/part_damage = ExtResource( 3 )

[node name="area_part_3" type="Area2D" parent="areas" groups=[
"damage",
]]
position = Vector2( 5, 0 )
monitoring = false
monitorable = false
collision_layer = 4
collision_mask = 0

[node name="coll" type="CollisionShape2D" parent="areas/area_part_3"]
position = Vector2( 0.5, 0.5 )
shape = SubResource( 2 )

[node name="pol" type="Polygon2D" parent="areas/area_part_3"]
polygon = PoolVector2Array( 0, -1, 0, 2, 1, 2, 1, -1 )

[node name="anim" type="AnimationPlayer" parent="areas/area_part_3"]
anims/destroy = SubResource( 3 )
anims/part_damage = ExtResource( 3 )

[node name="anim" type="AnimationPlayer" parent="."]
anims/damage = ExtResource( 4 )
anims/destroy = SubResource( 4 )
anims/fly_in = SubResource( 5 )

[node name="hit" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 6 )

[node name="shot" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 5 )
