diff --git a/Scripts/Audio/music_manager.gd b/Scripts/Audio/music_manager.gd index 1b2215c..eb29fab 100644 --- a/Scripts/Audio/music_manager.gd +++ b/Scripts/Audio/music_manager.gd @@ -16,12 +16,8 @@ func play_music(audio: AudioStream, crossfade = true): _tracks[_current].stream = audio _tracks[_current].play() -func _on_game_paused(): - _tracks[_current].volume_db = -10.0 - -func _on_game_unpaused(): - _tracks[_current].volume_db = 0.0 - +func _on_game_pause_toggled(paused: bool): + _tracks[_current].volume_db = -10.0 if paused else 0.0 func _on_cutscene_issued_command(command: CutsceneCommand, manager: CutsceneManager): if command is CueBGMCommand: diff --git a/world/world.tscn b/world/world.tscn index 503a67d..0035174 100644 --- a/world/world.tscn +++ b/world/world.tscn @@ -279,4 +279,5 @@ script = ExtResource("24_6ypry") [connection signal="defeated" from="ReedAI" to="." method="_on_ai_defeated"] [connection signal="got_hurt" from="ReedAI" to="CanvasLayer/BattleUI" method="_on_enemy_got_hurt"] [connection signal="game_pause_toggled" from="GameState" to="PauseMenu" method="_on_game_pause_toggled"] +[connection signal="game_pause_toggled" from="GameState" to="MusicManager" method="_on_game_pause_toggled"] [connection signal="game_pause_toggled" from="GameState" to="SoundManager" method="_on_game_pause_toggled"]