[gd_scene load_steps=6 format=2]

[ext_resource path="res://scripts/enemy_c.gd" type="Script" id=1]
[ext_resource path="res://sprites/enemies.png" type="Texture" id=2]
[ext_resource path="res://audio/sounds/explosssion_2.wav" type="AudioStream" id=3]

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

[sub_resource type="Animation" id=2]
resource_name = "hit"
length = 0.2
tracks/0/type = "value"
tracks/0/path = NodePath("hit_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.2 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ]
}

[node name="enemy_c" type="Area2D"]
monitorable = false
collision_mask = 0
script = ExtResource( 1 )
speed = 10
score_bonus = 300
health = 20

[node name="sprite" type="Sprite" parent="."]
texture = ExtResource( 2 )
region_enabled = true
region_rect = Rect2( 0, 48, 48, 16 )

[node name="hit_sprite" type="Sprite" parent="."]
modulate = Color( 1, 1, 1, 0 )
texture = ExtResource( 2 )
region_enabled = true
region_rect = Rect2( 48, 48, 48, 16 )

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

[node name="timer" type="Timer" parent="."]
one_shot = true

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

[node name="reloading_time" type="Timer" parent="."]
wait_time = 1.5
one_shot = true

[node name="shoot_pos_1" type="Position2D" parent="."]
position = Vector2( -16, 8 )

[node name="shoot_pos_2" type="Position2D" parent="."]
position = Vector2( 16, 8 )

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

[node name="explossion" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 3 )
pitch_scale = 0.5
[connection signal="area_entered" from="." to="." method="_on_enemy_1_area_entered"]
