Merge pull request #268 from KirbyKid256/pulls/fixed-title-bgm-looping

Fixed Title and Boo Race BGM Looping
This commit is contained in:
Joe H
2025-09-19 16:01:35 +01:00
committed by GitHub
7 changed files with 36 additions and 4 deletions

View File

@@ -304,7 +304,9 @@ func load_image_from_path(path := "") -> ImageTexture:
func load_audio_from_path(path := "") -> AudioStream:
var stream = null
if path.contains("res://"):
if path.contains(".bgm"):
stream = AudioManager.generate_interactive_stream(JSON.parse_string(FileAccess.get_file_as_string(path)))
elif path.contains("res://"):
return load(path)
if path.contains(".wav"):
stream = AudioStreamWAV.load_from_file(path)

View File

@@ -56,6 +56,7 @@ func _ready() -> void:
Level.can_set_time = true
setup_visuals()
%LevelLabels.get_child(BooRaceHandler.current_level_id).grab_focus()
$Music.play()
func _exit_tree() -> void:
Global.get_node("GameHUD").show()