diff --git a/godot_ship/.import/BGM - Captain Scurvy.ogg-e6a4c7b7e6bf2999f35a2157c007b514.md5 b/godot_ship/.import/BGM - Captain Scurvy.ogg-e6a4c7b7e6bf2999f35a2157c007b514.md5 new file mode 100644 index 0000000..9d059f1 --- /dev/null +++ b/godot_ship/.import/BGM - Captain Scurvy.ogg-e6a4c7b7e6bf2999f35a2157c007b514.md5 @@ -0,0 +1,3 @@ +source_md5="b8fcdd3fcd8e6af7810b21a25fbbfce8" +dest_md5="2a8113abc3da9686cb5813edf48afc5b" + diff --git a/godot_ship/.import/BGM - Captain Scurvy.ogg-e6a4c7b7e6bf2999f35a2157c007b514.oggstr b/godot_ship/.import/BGM - Captain Scurvy.ogg-e6a4c7b7e6bf2999f35a2157c007b514.oggstr new file mode 100644 index 0000000..65aa47b Binary files /dev/null and b/godot_ship/.import/BGM - Captain Scurvy.ogg-e6a4c7b7e6bf2999f35a2157c007b514.oggstr differ diff --git a/godot_ship/.import/ButtonSFX.ogg-473913894e173ed0b5a935d3831ff9b6.md5 b/godot_ship/.import/ButtonSFX.ogg-473913894e173ed0b5a935d3831ff9b6.md5 new file mode 100644 index 0000000..ee0b67b --- /dev/null +++ b/godot_ship/.import/ButtonSFX.ogg-473913894e173ed0b5a935d3831ff9b6.md5 @@ -0,0 +1,3 @@ +source_md5="f3327d109e31f66117e71347bf5d23a6" +dest_md5="aeb44b0dd8e5c6c535635c258781f974" + diff --git a/godot_ship/.import/ButtonSFX.ogg-473913894e173ed0b5a935d3831ff9b6.oggstr b/godot_ship/.import/ButtonSFX.ogg-473913894e173ed0b5a935d3831ff9b6.oggstr new file mode 100644 index 0000000..6914a21 Binary files /dev/null and b/godot_ship/.import/ButtonSFX.ogg-473913894e173ed0b5a935d3831ff9b6.oggstr differ diff --git a/godot_ship/BGM - Captain Scurvy.ogg.import b/godot_ship/BGM - Captain Scurvy.ogg.import deleted file mode 100644 index f95cf60..0000000 --- a/godot_ship/BGM - Captain Scurvy.ogg.import +++ /dev/null @@ -1,15 +0,0 @@ -[remap] - -importer="ogg_vorbis" -type="AudioStreamOGGVorbis" -path="res://.import/BGM - Captain Scurvy.ogg-324577f882a12f61687c746f4a4197ad.oggstr" - -[deps] - -source_file="res://BGM - Captain Scurvy.ogg" -dest_files=[ "res://.import/BGM - Captain Scurvy.ogg-324577f882a12f61687c746f4a4197ad.oggstr" ] - -[params] - -loop=true -loop_offset=0 diff --git a/godot_ship/ButtonSFX.ogg.import b/godot_ship/ButtonSFX.ogg.import deleted file mode 100644 index 29e78fb..0000000 --- a/godot_ship/ButtonSFX.ogg.import +++ /dev/null @@ -1,15 +0,0 @@ -[remap] - -importer="ogg_vorbis" -type="AudioStreamOGGVorbis" -path="res://.import/ButtonSFX.ogg-8c2b86050b91df563dcd88f6eb352c80.oggstr" - -[deps] - -source_file="res://ButtonSFX.ogg" -dest_files=[ "res://.import/ButtonSFX.ogg-8c2b86050b91df563dcd88f6eb352c80.oggstr" ] - -[params] - -loop=false -loop_offset=0 diff --git a/godot_ship/BGM - Captain Scurvy.ogg b/godot_ship/assets/audio/BGM - Captain Scurvy.ogg similarity index 100% rename from godot_ship/BGM - Captain Scurvy.ogg rename to godot_ship/assets/audio/BGM - Captain Scurvy.ogg diff --git a/godot_ship/assets/audio/BGM - Captain Scurvy.ogg.import b/godot_ship/assets/audio/BGM - Captain Scurvy.ogg.import new file mode 100644 index 0000000..c0fe158 --- /dev/null +++ b/godot_ship/assets/audio/BGM - Captain Scurvy.ogg.import @@ -0,0 +1,15 @@ +[remap] + +importer="ogg_vorbis" +type="AudioStreamOGGVorbis" +path="res://.import/BGM - Captain Scurvy.ogg-e6a4c7b7e6bf2999f35a2157c007b514.oggstr" + +[deps] + +source_file="res://assets/audio/BGM - Captain Scurvy.ogg" +dest_files=[ "res://.import/BGM - Captain Scurvy.ogg-e6a4c7b7e6bf2999f35a2157c007b514.oggstr" ] + +[params] + +loop=true +loop_offset=0 diff --git a/godot_ship/ButtonSFX.ogg b/godot_ship/assets/audio/ButtonSFX.ogg similarity index 100% rename from godot_ship/ButtonSFX.ogg rename to godot_ship/assets/audio/ButtonSFX.ogg diff --git a/godot_ship/assets/audio/ButtonSFX.ogg.import b/godot_ship/assets/audio/ButtonSFX.ogg.import new file mode 100644 index 0000000..53c611b --- /dev/null +++ b/godot_ship/assets/audio/ButtonSFX.ogg.import @@ -0,0 +1,15 @@ +[remap] + +importer="ogg_vorbis" +type="AudioStreamOGGVorbis" +path="res://.import/ButtonSFX.ogg-473913894e173ed0b5a935d3831ff9b6.oggstr" + +[deps] + +source_file="res://assets/audio/ButtonSFX.ogg" +dest_files=[ "res://.import/ButtonSFX.ogg-473913894e173ed0b5a935d3831ff9b6.oggstr" ] + +[params] + +loop=false +loop_offset=0 diff --git a/godot_ship/default_bus_layout.tres b/godot_ship/default_bus_layout.tres new file mode 100644 index 0000000..ae28e38 --- /dev/null +++ b/godot_ship/default_bus_layout.tres @@ -0,0 +1,9 @@ +[gd_resource type="AudioBusLayout" format=2] + +[resource] +bus/1/name = "BGM" +bus/1/solo = false +bus/1/mute = false +bus/1/bypass_fx = false +bus/1/volume_db = 0.0 +bus/1/send = "Master" diff --git a/godot_ship/scenes/BackgroundMusic.tscn b/godot_ship/scenes/BackgroundMusic.tscn index ed365b8..0ebc2a0 100644 --- a/godot_ship/scenes/BackgroundMusic.tscn +++ b/godot_ship/scenes/BackgroundMusic.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=2] -[ext_resource path="res://BGM - Captain Scurvy.ogg" type="AudioStream" id=1] +[ext_resource path="res://assets/audio/BGM - Captain Scurvy.ogg" type="AudioStream" id=1] [node name="Control" type="Control"] anchor_right = 1.0 @@ -12,3 +12,4 @@ __meta__ = { [node name="BGM" type="AudioStreamPlayer" parent="."] stream = ExtResource( 1 ) autoplay = true +bus = "BGM" diff --git a/godot_ship/scenes/Options.tscn b/godot_ship/scenes/Options.tscn index f1e1b71..1f4ed81 100644 --- a/godot_ship/scenes/Options.tscn +++ b/godot_ship/scenes/Options.tscn @@ -2,7 +2,7 @@ [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://ButtonSFX.ogg" type="AudioStream" id=3] +[ext_resource path="res://assets/audio/ButtonSFX.ogg" type="AudioStream" id=3] [node name="Options" type="Control"] anchor_right = 1.0 diff --git a/godot_ship/scenes/Title Screen.tscn b/godot_ship/scenes/Title Screen.tscn index e6fee5e..37598e5 100644 --- a/godot_ship/scenes/Title Screen.tscn +++ b/godot_ship/scenes/Title Screen.tscn @@ -2,7 +2,7 @@ [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://ButtonSFX.ogg" type="AudioStream" id=3] +[ext_resource path="res://assets/audio/ButtonSFX.ogg" type="AudioStream" id=3] [node name="Title Node" type="Control"] anchor_right = 1.0 diff --git a/godot_ship/script/options/Options.gd b/godot_ship/script/options/Options.gd index 44cf018..061b44e 100644 --- a/godot_ship/script/options/Options.gd +++ b/godot_ship/script/options/Options.gd @@ -20,14 +20,10 @@ func _on_Button_pressed(): func _on_SFX_Slider_value_changed(value): OptionsController.set_sfx_vol(value) OptionsController.save_options() - if !$ButtonSFX.is_playing(): - $ButtonSFX.play() func _on_Volume_Slider_value_changed(value): OptionsController.set_mus_vol(value) OptionsController.save_options() - if !$ButtonSFX.is_playing(): - $ButtonSFX.play() func _on_Light_pressed(): OptionsController.set_theme("light") diff --git a/godot_ship/script/options/OptionsController.gd b/godot_ship/script/options/OptionsController.gd index 82f018e..b031864 100644 --- a/godot_ship/script/options/OptionsController.gd +++ b/godot_ship/script/options/OptionsController.gd @@ -24,7 +24,7 @@ func set_theme(theme_name): emit_signal("change_theme", theme) func set_mus_vol(volume): mus_vol = volume - AudioServer.set_bus_volume_db(AudioServer.get_bus_index("Master"), mus_vol) + AudioServer.set_bus_volume_db(AudioServer.get_bus_index("BGM"), mus_vol) emit_signal("change_mus_volume", mus_vol) func set_sfx_vol(volume): sfx_vol = volume @@ -44,7 +44,7 @@ func load_options(): mus_vol = f.get_var() sfx_vol = f.get_var() f.close() - AudioServer.set_bus_volume_db(AudioServer.get_bus_index("Master"), mus_vol) + AudioServer.set_bus_volume_db(AudioServer.get_bus_index("BGM"), mus_vol) # Getters func get_theme():