extends Control
class_name UI

@export var max_coins: int = 40
@export var coins: int:
	set = set_coins

@onready var coin_amount_text: Label = $PlayerInfoBox/CoinFrame/CoinAmountText
@onready var experience_progress: ProgressBar = $PlayerInfoBox/ExperienceProgress


func _ready() -> void:
	experience_progress.max_value = max_coins
	set_coins(0)

func set_coins(value: int) -> void:
	coins = value
	coin_amount_text.text = str(value)
	experience_progress.value = coins
