[gd_scene load_steps=5 format=2]

[ext_resource path="res://addons/dialogic/Nodes/BackgroundMusic.gd" type="Script" id=1]

[sub_resource type="Animation" id=1]
resource_name = "FadeOut"
length = 0.5
tracks/0/type = "value"
tracks/0/path = NodePath("Track1:volume_db")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.5 ),
"transitions": PoolRealArray( 5.66, 1 ),
"update": 0,
"values": [ 0.0, -80.0 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("Track2:volume_db")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.5 ),
"transitions": PoolRealArray( 5.66, 1 ),
"update": 0,
"values": [ 0.0, -80.0 ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("Track2:playing")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0.5 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
tracks/3/type = "value"
tracks/3/path = NodePath("Track1:playing")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0.5 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}

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

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

[node name="BackgroundMusic" type="Control"]
margin_right = 40.0
margin_bottom = 40.0
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Track1" type="AudioStreamPlayer" parent="."]

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

[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/FadeOut = SubResource( 1 )
anims/FadeToTrack1 = SubResource( 2 )
anims/FadeToTrack2 = SubResource( 3 )
