pause menu music. closes #71
This commit is contained in:
@@ -412,6 +412,7 @@ func unpause_game():
|
||||
escoria.main.current_scene.game.show_ui()
|
||||
escoria.main.current_scene.show()
|
||||
escoria.set_game_paused(false)
|
||||
play_game_music()
|
||||
|
||||
func pause_game():
|
||||
if escoria.current_state == escoria.GAME_STATE.PAUSED:
|
||||
@@ -429,6 +430,7 @@ func pause_game():
|
||||
escoria.main.current_scene.game.hide_ui()
|
||||
escoria.main.current_scene.hide()
|
||||
escoria.set_game_paused(true)
|
||||
play_pause_music()
|
||||
|
||||
func apply_custom_settings(custom_settings: Dictionary):
|
||||
if custom_settings.has("speech_speed"):
|
||||
@@ -522,6 +524,16 @@ func clear_tooltip():
|
||||
(tooltip_node as ESCRichTooltip).clear()
|
||||
|
||||
|
||||
func play_pause_music():
|
||||
escoria.object_manager.get_object("_music").node.set_state(
|
||||
"res://gymkhana/sounds/intro_menu_loop.ogg"
|
||||
)
|
||||
|
||||
func play_game_music():
|
||||
escoria.object_manager.get_object("_music").node.set_state(
|
||||
"res://gymkhana/sounds/music_loop.ogg"
|
||||
)
|
||||
|
||||
var musicEnabled = true
|
||||
|
||||
func _on_MusicButton_pressed():
|
||||
|
||||
Reference in New Issue
Block a user