From 6162455a71d62dd650511f73c7239c83271db2ea Mon Sep 17 00:00:00 2001 From: Ategon Date: Sat, 14 Sep 2024 23:23:38 -0400 Subject: [PATCH] Start with resources --- ui.gd | 3 +++ ui/counters.gd | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ui.gd b/ui.gd index 104fc64..70c0907 100644 --- a/ui.gd +++ b/ui.gd @@ -2,6 +2,9 @@ extends CanvasLayer @onready var animation_player: AnimationPlayer = $AnimationPlayer +func _ready() -> void: + Persister.persist_data("wood", 5) + Persister.persist_data("stone", 5) func _process(delta: float) -> void: if Input.is_action_just_pressed("lclick") and not Persister.get_value("game_started"): diff --git a/ui/counters.gd b/ui/counters.gd index df24e67..733e163 100644 --- a/ui/counters.gd +++ b/ui/counters.gd @@ -8,4 +8,4 @@ func _ready() -> void: func _on_value_change(data): - text = data.value + text = str(data.value)