1
Fork 0
mirror of https://github.com/Steffo99/hella-farm.git synced 2024-11-24 17:14:23 +00:00
hella-farm/scenes/game/gold_display.gd

16 lines
295 B
GDScript

extends PanelContainer
class_name GoldDisplay
@onready var label: Label = %"Label"
@onready var animator: AnimationPlayer = %"Animator"
func set_text(value: int) -> void:
label.text = "%d" % value
func display(value: int):
set_text(value)
animator.stop()
animator.play(&"collect")