Audio manager implementation
This commit is contained in:
@@ -15,6 +15,7 @@ func _draw() -> void:
|
||||
func _on_body_entered(body: Node) -> void:
|
||||
if not body.is_in_group("player") or item == null:
|
||||
return
|
||||
AudioManager.play("item_pickup")
|
||||
RunManager.collect_item(item) # Triggers item_collected signal -> player_stats recalculates
|
||||
if item.heal_on_pickup > 0.0:
|
||||
body.stats.heal(item.heal_on_pickup)
|
||||
|
||||
@@ -68,6 +68,7 @@ func _attempt_purchase() -> void:
|
||||
return
|
||||
|
||||
RunManager.spend_credits(price)
|
||||
AudioManager.play("item_pickup")
|
||||
|
||||
var player := get_tree().get_first_node_in_group("player") as Node2D
|
||||
if player == null:
|
||||
|
||||
Reference in New Issue
Block a user