1
0
mirror of https://github.com/JohnBreaux/Boat-Battle.git synced 2025-02-04 12:28:35 +00:00

Added AudioBus. SFX Vol slider now works

This commit is contained in:
hpham474
2021-11-07 20:33:07 -06:00
parent 9929aab354
commit 388fcb9483
11 changed files with 65 additions and 35 deletions

View File

@@ -0,0 +1,22 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://assets/audio/BGM - Captain Scurvy.ogg" type="AudioStream" id=1]
[ext_resource path="res://script/audio controller/AudioController.gd" type="Script" id=2]
[ext_resource path="res://assets/audio/ButtonSFX.ogg" type="AudioStream" id=3]
[node name="Control" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="BGM" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 1 )
autoplay = true
bus = "BGM"
[node name="buttonSFX" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 3 )
bus = "SFX"

View File

@@ -1,15 +0,0 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://assets/audio/BGM - Captain Scurvy.ogg" type="AudioStream" id=1]
[node name="Control" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="BGM" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 1 )
autoplay = true
bus = "BGM"

View File

@@ -1,8 +1,7 @@
[gd_scene load_steps=4 format=2]
[gd_scene load_steps=3 format=2]
[ext_resource path="res://script/options/Option-Background.png" type="Texture" id=1]
[ext_resource path="res://script/options/Options.gd" type="Script" id=2]
[ext_resource path="res://assets/audio/ButtonSFX.ogg" type="AudioStream" id=3]
[node name="Options" type="Control"]
anchor_right = 1.0
@@ -68,7 +67,7 @@ focus_neighbour_top = NodePath("../../../Back")
focus_neighbour_bottom = NodePath("../../Volume Setting/Volume Slider")
focus_next = NodePath("../../Volume Setting/Volume Slider")
focus_previous = NodePath("../../../Back")
min_value = -30.0
min_value = -25.0
max_value = 0.0
tick_count = 11
__meta__ = {
@@ -156,9 +155,6 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="ButtonSFX" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 3 )
[connection signal="value_changed" from="Sliders/SFX Setting/SFX Slider" to="." method="_on_SFX_Slider_value_changed"]
[connection signal="value_changed" from="Sliders/Volume Setting/Volume Slider" to="." method="_on_Volume_Slider_value_changed"]
[connection signal="pressed" from="Buttons/Light" to="." method="_on_Light_pressed"]

View File

@@ -1,8 +1,7 @@
[gd_scene load_steps=4 format=2]
[gd_scene load_steps=3 format=2]
[ext_resource path="res://script/title screen/Title-Screen-Background.png" type="Texture" id=1]
[ext_resource path="res://script/title screen/Title Screen.gd" type="Script" id=2]
[ext_resource path="res://assets/audio/ButtonSFX.ogg" type="AudioStream" id=3]
[node name="Title Node" type="Control"]
anchor_right = 1.0
@@ -16,9 +15,6 @@ __meta__ = {
position = Vector2( 320, 180 )
texture = ExtResource( 1 )
[node name="ButtonSFX" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 3 )
[node name="VBoxContainer" type="VBoxContainer" parent="."]
anchor_left = 0.5
anchor_top = 0.5