All audio stuff moved to audio autoload and removed game.tscn in favor of just game.gd

This commit is contained in:
pennyrigate 2023-02-25 23:44:13 -05:00
parent 30cfad6e7e
commit e1a30188a6
21 changed files with 134 additions and 97 deletions

View file

@ -23,12 +23,12 @@ func _ready():
func _on_Area2D_area_entered(area):
#Collect
if area.is_in_group("player"):
Game.play_sound(Game.a_star,Game.ac_collectible)
Audio.play_sound(Audio.a_star,Audio.ac_collectible)
Game.score += 100
Game.stars[color] = true
#5 Star reward
if Game.stars[0] && Game.stars[1] && Game.stars[2] && Game.stars[3] && Game.stars[4]:
Game.play_sound(Game.a_shard,Game.ac_collectible)
Audio.play_sound(Audio.a_shard,Audio.ac_collectible)
Game.shards += 1
Game.shards_collected[4] = true
Game.score += 500