feat: implement MusicManager singleton and integrate background music into lobby scene
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://du6b246jhn0tj"
|
||||
path="res://.godot/imported/arena_bg_music.wav-12fe73cd56e22aeda5761a2108eff1b3.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/arena_bg_music.wav"
|
||||
dest_files=["res://.godot/imported/arena_bg_music.wav-12fe73cd56e22aeda5761a2108eff1b3.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://crkiqt7sr6kar"
|
||||
path="res://.godot/imported/default_bg.wav-839b907576844c120319a9c7e4b45fb3.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/default_bg.wav"
|
||||
dest_files=["res://.godot/imported/default_bg.wav-839b907576844c120319a9c7e4b45fb3.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://cvmjyk2fahm1j"
|
||||
path="res://.godot/imported/level_bridge.wav-dbed4a154c1ff2dc59be89f0c47534d7.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/level_bridge.wav"
|
||||
dest_files=["res://.godot/imported/level_bridge.wav-dbed4a154c1ff2dc59be89f0c47534d7.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
+2
-2
@@ -102,8 +102,8 @@ var _bot_names: Dictionary = {}
|
||||
# var server_ip_input: LineEdit
|
||||
|
||||
func _ready():
|
||||
# Stop background music when in Lobby
|
||||
MusicManager.stop_music()
|
||||
# Start background music for Lobby
|
||||
MusicManager.start_music()
|
||||
|
||||
# Load character textures
|
||||
_load_character_textures()
|
||||
|
||||
@@ -48,7 +48,7 @@ func start_music():
|
||||
"Stop n Go":
|
||||
track_path = "res://assets/sounds/stop_n_go.wav"
|
||||
"Freemode", "Tekton Doors", _:
|
||||
track_path = "res://assets/sounds/freemode.wav"
|
||||
track_path = "res://assets/sounds/level_bridge.wav"
|
||||
|
||||
play_track(track_path)
|
||||
|
||||
@@ -104,4 +104,5 @@ func _on_music_finished():
|
||||
print("[MusicManager] Track finished: ", current_track)
|
||||
# Fallback looping if for some reason the native loop didn't work
|
||||
if current_track != "":
|
||||
print("[MusicManag
|
||||
print("[MusicManager] Restarting track (manual loop fallback): ", current_track)
|
||||
music_player.play()
|
||||
|
||||
Reference in New Issue
Block a user