extends Area2D
class_name Coin

export var value = 100;
signal collected



func _on_body_entered(body: Node) -> void:
	if body.name == "Player":
		$Label.text = str(value)
		AudioManager.play_sfx(AudioManager.Sfx.COIN_COLLECTION)
#		emit_signal("collected", value)
		GameState.coin_collected()
		$AnimationPlayer.play("collected")
	pass # Replace with function body.
