[gd_scene format=3 uid="uid://pyuorpwb7lpe"]

[ext_resource type="Script" uid="uid://dcrnf4r6c5qaw" path="res://scenes/player.gd" id="1_sweqy"]
[ext_resource type="PackedScene" uid="uid://bwxxdrdvo3le0" path="res://scenes/bullet.tscn" id="2_1jxqw"]
[ext_resource type="Texture2D" uid="uid://ces8fm7lxh574" path="res://_graphics/Mini Pixel Pack 3/Player ship/Boosters (16 x 16).png" id="3_1jxqw"]
[ext_resource type="Shader" uid="uid://dfywtah53il1m" path="res://shaders/player_hit.gdshader" id="3_dw050"]
[ext_resource type="Texture2D" uid="uid://bjdhq42ummgky" path="res://_graphics/Mini Pixel Pack 3/Player ship/Boosters_left (16 x 16).png" id="4_dw050"]
[ext_resource type="Texture2D" uid="uid://cjq40d464xovr" path="res://sprites/david-headless-sprite.png" id="4_smehm"]
[ext_resource type="Texture2D" uid="uid://cjv3xbuj65pav" path="res://_graphics/Mini Pixel Pack 3/Player ship/Boosters_right (16 x 16).png" id="5_b26j0"]
[ext_resource type="PackedScene" uid="uid://4jvu41vu2557" path="res://scenes/explosion.tscn" id="8_dw050"]
[ext_resource type="Texture2D" uid="uid://bnc77g20gb20h" path="res://sprites/david-head.png" id="8_ur7pv"]
[ext_resource type="Texture2D" uid="uid://bm7fgqwqfqmf4" path="res://sprites/explosion_pallete-swap.png" id="10_d2wvv"]
[ext_resource type="AudioStream" uid="uid://co6fdp24nloo1" path="res://sounds/HeadInflatePOP 2.0.wav" id="11_d2wvv"]

[sub_resource type="ShaderMaterial" id="ShaderMaterial_b26j0"]
resource_local_to_scene = true
shader = ExtResource("3_dw050")
shader_parameter/toggle = 0.0

[sub_resource type="AtlasTexture" id="AtlasTexture_n7ghd"]
atlas = ExtResource("3_1jxqw")
region = Rect2(0, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_nvl01"]
atlas = ExtResource("3_1jxqw")
region = Rect2(16, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_ivps1"]
atlas = ExtResource("4_dw050")
region = Rect2(0, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_urp6f"]
atlas = ExtResource("4_dw050")
region = Rect2(16, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_bwjto"]
atlas = ExtResource("5_b26j0")
region = Rect2(0, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_606se"]
atlas = ExtResource("5_b26j0")
region = Rect2(16, 0, 16, 16)

[sub_resource type="SpriteFrames" id="SpriteFrames_u1c27"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_n7ghd")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_nvl01")
}],
"loop": true,
"name": &"forward",
"speed": 10.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_ivps1")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_urp6f")
}],
"loop": true,
"name": &"left",
"speed": 10.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_bwjto")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_606se")
}],
"loop": true,
"name": &"right",
"speed": 10.0
}]

[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_dw050"]
particles_animation = true
particles_anim_h_frames = 2
particles_anim_v_frames = 1
particles_anim_loop = false

[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_b26j0"]
particle_flag_disable_z = true
gravity = Vector3(0, 98, 0)

[sub_resource type="RectangleShape2D" id="RectangleShape2D_op7ga"]
size = Vector2(14, 12.465912)

[node name="Player" type="Area2D" unique_id=1628218629]
script = ExtResource("1_sweqy")
bullet_scene = ExtResource("2_1jxqw")

[node name="Ship" type="Sprite2D" parent="." unique_id=1499605112 groups=["ship"]]
unique_name_in_owner = true
material = SubResource("ShaderMaterial_b26j0")
texture = ExtResource("4_smehm")
hframes = 3

[node name="Boosters" type="AnimatedSprite2D" parent="Ship" unique_id=1877984106]
visible = false
position = Vector2(0, 15)
sprite_frames = SubResource("SpriteFrames_u1c27")
animation = &"forward"
autoplay = "forward"

[node name="BoosterBurst" type="GPUParticles2D" parent="Ship/Boosters" unique_id=1873224221]
visible = false
texture_repeat = 2
material = SubResource("CanvasItemMaterial_dw050")
amount = 10
texture = ExtResource("3_1jxqw")
lifetime = 0.75
interp_to_end = 1.0
preprocess = 1.83
speed_scale = 15.69
draw_order = 2
trail_lifetime = 1.85
trail_sections = 2
process_material = SubResource("ParticleProcessMaterial_b26j0")

[node name="Head" type="Sprite2D" parent="Ship" unique_id=522385006]
z_index = -1
position = Vector2(2, -17)
texture = ExtResource("8_ur7pv")
hframes = 3

[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1614510161]
scale = Vector2(2.0054688, 2.0054688)
shape = SubResource("RectangleShape2D_op7ga")

[node name="GunCooldown" type="Timer" parent="." unique_id=831201762]
one_shot = true

[node name="Explosion" parent="." unique_id=321630316 instance=ExtResource("8_dw050")]
visible = false
texture = ExtResource("10_d2wvv")
region_enabled = true
region_rect = Rect2(0, 0, 96, 16)

[node name="HeadInflate" type="AudioStreamPlayer2D" parent="." unique_id=374500278]
stream = ExtResource("11_d2wvv")
volume_db = 2.1

[connection signal="area_entered" from="." to="." method="_on_area_entered"]
[connection signal="damage_taken" from="." to="." method="_on_damage_taken"]
[connection signal="timeout" from="GunCooldown" to="." method="_on_gun_cooldown_timeout"]
