fixed bug where pausing after collecting a shard would play 2 songs at once
This commit is contained in:
parent
833ef2056a
commit
cdb1a9250b
1 changed files with 3 additions and 1 deletions
|
@ -66,6 +66,7 @@ func play_shard_sound():
|
||||||
var idx = AudioServer.get_bus_index("sound")
|
var idx = AudioServer.get_bus_index("sound")
|
||||||
AudioServer.set_bus_mute(idx, true)
|
AudioServer.set_bus_mute(idx, true)
|
||||||
ac_music.set_stream_paused(true)
|
ac_music.set_stream_paused(true)
|
||||||
|
ac_pause_music.set_stream_paused(true)
|
||||||
if Game.deaths == 0:
|
if Game.deaths == 0:
|
||||||
play_sound(a_good_job,ac_shard)
|
play_sound(a_good_job,ac_shard)
|
||||||
else:
|
else:
|
||||||
|
@ -74,4 +75,5 @@ func play_shard_sound():
|
||||||
func _on_ShardSound_finished():
|
func _on_ShardSound_finished():
|
||||||
var idx = AudioServer.get_bus_index("sound")
|
var idx = AudioServer.get_bus_index("sound")
|
||||||
AudioServer.set_bus_mute(idx, false)
|
AudioServer.set_bus_mute(idx, false)
|
||||||
ac_music.set_stream_paused(false)
|
if !get_tree().paused: ac_music.set_stream_paused(false)
|
||||||
|
ac_pause_music.set_stream_paused(false)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue