parent
1b7d93195f
commit
d802ce13b7
6 changed files with 33 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue