[gd_scene load_steps=12 format=3 uid="uid://c0688rpnga7bt"]

[ext_resource type="Script" uid="uid://b5qkxnurvqbi2" path="res://scripts/flyer.gd" id="1_ben2c"]
[ext_resource type="Texture2D" uid="uid://djduujf1cj53r" path="res://sprites/pilotnorkt.png" id="2_ddpln"]
[ext_resource type="Script" uid="uid://cu7q3fqvjoyos" path="res://scripts/player_controller.gd" id="3_ddpln"]
[ext_resource type="Script" uid="uid://cr8aonshxxpqf" path="res://scripts/weapon.gd" id="4_isfd2"]
[ext_resource type="PackedScene" uid="uid://b2ly0rd4mua6i" path="res://scenes/shot.tscn" id="5_unik1"]
[ext_resource type="AudioStream" uid="uid://bkguu5u88kjlk" path="res://audio/gun1.wav" id="6_0tbcv"]
[ext_resource type="AudioStream" uid="uid://cbpofkydw3sa5" path="res://audio/gun2.wav" id="7_aueel"]
[ext_resource type="AudioStream" uid="uid://clg0ybr0jlcwc" path="res://audio/gun3.wav" id="8_v0x65"]
[ext_resource type="AudioStream" uid="uid://brc0i5e6x7v4h" path="res://audio/gun4.wav" id="9_h3pf6"]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_isfd2"]
size = Vector2(74.5, 29)

[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_3kq13"]
random_pitch = 1.01
random_volume_offset_db = 0.01
streams_count = 4
stream_0/stream = ExtResource("6_0tbcv")
stream_1/stream = ExtResource("7_aueel")
stream_2/stream = ExtResource("8_v0x65")
stream_3/stream = ExtResource("9_h3pf6")

[node name="Node2D" type="Node2D"]

[node name="CharacterBody2D" type="CharacterBody2D" parent="." node_paths=PackedStringArray("weapons")]
script = ExtResource("1_ben2c")
weapons = [NodePath("Weapon")]

[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
position = Vector2(3.75, 1.5)
shape = SubResource("RectangleShape2D_isfd2")

[node name="Sprite2D" type="Sprite2D" parent="CharacterBody2D"]
texture_filter = 1
texture = ExtResource("2_ddpln")

[node name="PlayerController" type="Node" parent="CharacterBody2D" node_paths=PackedStringArray("controlled_flyer")]
script = ExtResource("3_ddpln")
controlled_flyer = NodePath("..")
metadata/_custom_type_script = "uid://cu7q3fqvjoyos"

[node name="Weapon" type="Node2D" parent="CharacterBody2D" node_paths=PackedStringArray("shot_spawn", "audio")]
script = ExtResource("4_isfd2")
max_ammo = 100
shot = ExtResource("5_unik1")
shot_spawn = NodePath("ShotSpawn")
audio = NodePath("AudioStreamPlayer2D")
metadata/_custom_type_script = "uid://cr8aonshxxpqf"

[node name="ShotSpawn" type="Node2D" parent="CharacterBody2D/Weapon"]
position = Vector2(46, 10)

[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="CharacterBody2D/Weapon"]
stream = SubResource("AudioStreamRandomizer_3kq13")
volume_db = -2.59
