shard sound set to own bus and channel (fixes #53) (fixes #54)

This commit is contained in:
pennyrigate 2023-02-26 17:05:11 -05:00
parent 1b7d93195f
commit d802ce13b7
6 changed files with 33 additions and 7 deletions

View file

@ -9,9 +9,7 @@ func _ready():
func _on_Area2D_area_entered(area):
#Collect
if area.is_in_group("player"):
Audio.ac_music.stream_paused = true
Audio.play_sound(Audio.a_shard,Audio.ac_collectible)
Audio.ac_collectible.connect("finished", Audio.ac_music, "set_stream_paused", [false])
Audio.play_shard_sound()
Game.score += 500
Game.shards += value
Game.shards_collected[number] = true

View file

@ -28,7 +28,7 @@ func _on_Area2D_area_entered(area):
Game.stars[color] = true
#5 Star reward
if Game.stars[0] && Game.stars[1] && Game.stars[2] && Game.stars[3] && Game.stars[4]:
Audio.play_sound(Audio.a_shard,Audio.ac_collectible)
Audio.play_shard_sound()
Game.shards += 1
Game.shards_collected[4] = true
Game.score += 500