[gd_scene load_steps=6 format=3 uid="uid://81jm7ixvk25n"]

[ext_resource type="Script" path="res://Scripts/Audio/music_manager.gd" id="1_6oqmm"]

[sub_resource type="Animation" id="Animation_pdo8g"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Track2:volume_db")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [-80.0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Track1:volume_db")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [0.0]
}

[sub_resource type="Animation" id="Animation_6vmfp"]
resource_name = "fade_to1"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Track2:volume_db")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0.15, 1),
"transitions": PackedFloat32Array(2.71828, 1),
"update": 0,
"values": [0.0, -80.0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Track1:volume_db")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.8),
"transitions": PackedFloat32Array(0.367879, 1),
"update": 0,
"values": [-80.0, 0.0]
}

[sub_resource type="Animation" id="Animation_yv1t3"]
resource_name = "fade_to2"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Track2:volume_db")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.8),
"transitions": PackedFloat32Array(0.367879, 1),
"update": 0,
"values": [-80.0, 0.0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Track1:volume_db")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0.15, 1),
"transitions": PackedFloat32Array(2.71828, 1),
"update": 0,
"values": [0.0, -80.0]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_ug0wt"]
_data = {
"RESET": SubResource("Animation_pdo8g"),
"fade_to1": SubResource("Animation_6vmfp"),
"fade_to2": SubResource("Animation_yv1t3")
}

[node name="MusicManager" type="Node"]
process_mode = 3
script = ExtResource("1_6oqmm")

[node name="Track1" type="AudioStreamPlayer" parent="."]
bus = &"BGM"

[node name="Track2" type="AudioStreamPlayer" parent="."]
volume_db = -80.0
bus = &"BGM"

[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_ug0wt")
}

[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_animation_player_animation_finished"]
