1
Fork 0
mirror of https://github.com/Steffo99/hella-farm.git synced 2024-11-22 16:14:22 +00:00
hella-farm/scenes/game/gold_counter.gd

17 lines
295 B
GDScript3
Raw Normal View History

2024-04-24 02:55:31 +00:00
extends PanelContainer
class_name GoldCounter
@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")