[gd_scene load_steps=15 format=2]

[ext_resource path="res://scripts/player.gd" type="Script" id=1]
[ext_resource path="res://sprites/aura.png" type="Texture" id=2]
[ext_resource path="res://sprites/player_body_part.png" type="Texture" id=3]
[ext_resource path="res://sprites/player.png" type="Texture" id=4]
[ext_resource path="res://audio/sounds/shoot.wav" type="AudioStream" id=5]
[ext_resource path="res://audio/sounds/powerup_collect.wav" type="AudioStream" id=6]
[ext_resource path="res://audio/sounds/explosssion_2.wav" type="AudioStream" id=7]

[sub_resource type="CircleShape2D" id=1]
radius = 17.0

[sub_resource type="Animation" id=2]
resource_name = "blink"
length = 0.2
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath("shield_sprie:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.1 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 1,
"values": [ true, false ]
}

[sub_resource type="Gradient" id=3]
colors = PoolColorArray( 1, 1, 1, 0.501961, 1, 1, 1, 0 )

[sub_resource type="GradientTexture" id=4]
gradient = SubResource( 3 )

[sub_resource type="ParticlesMaterial" id=5]
flag_disable_z = true
gravity = Vector3( 0, 0, 0 )
angular_velocity = 1.0
orbit_velocity = 0.0
orbit_velocity_random = 0.0
color_ramp = SubResource( 4 )

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

[sub_resource type="Animation" id=7]
tracks/0/type = "value"
tracks/0/path = NodePath("body:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ),
"update": 1,
"values": [ 0, 8, 9, 10, 11, 12, 13, 14, 15, 1 ]
}

[node name="player" type="Area2D"]
collision_layer = 6
script = ExtResource( 1 )

[node name="shield" type="Area2D" parent="."]
monitoring = false
monitorable = false
collision_layer = 0
collision_mask = 8

[node name="coll" type="CollisionShape2D" parent="shield"]
visible = false
modulate = Color( 0, 1, 0, 1 )
position = Vector2( 8, 8 )
shape = SubResource( 1 )

[node name="shield_sprie" type="Sprite" parent="shield"]
visible = false
modulate = Color( 0, 1, 0, 1 )
position = Vector2( 8, 8 )
texture = ExtResource( 2 )

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

[node name="shield_timer" type="Timer" parent="shield"]
wait_time = 0.1
one_shot = true

[node name="part" type="Particles2D" parent="."]
position = Vector2( 8, 8 )
emitting = false
amount = 16
lifetime = 0.2
local_coords = false
process_material = SubResource( 5 )
texture = ExtResource( 3 )

[node name="body" type="Sprite" parent="."]
texture = ExtResource( 4 )
centered = false
vframes = 8
hframes = 8

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

[node name="coll" type="CollisionShape2D" parent="."]
visible = false
position = Vector2( 8, 8 )
shape = SubResource( 6 )

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

[node name="shoot" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 5 )
bus = "sounds"

[node name="powerup_collect" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 6 )
bus = "sounds"

[node name="explossion" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 7 )
pitch_scale = 0.5
bus = "sounds"

[node name="anim" type="AnimationPlayer" parent="."]
playback_speed = 2.0
anims/barell_roll = SubResource( 7 )
[connection signal="area_entered" from="." to="." method="_on_player_area_entered"]
