brackeys-12/ui.gd
2024-09-14 23:43:31 -04:00

14 lines
474 B
GDScript

extends CanvasLayer
@onready var animation_player: AnimationPlayer = $AnimationPlayer
func _ready() -> void:
Persister.persist_data("wood", 5)
Persister.persist_data("stone", 5)
Persister.persist_data("population", 3)
Persister.persist_data("max_population", 3)
func _process(delta: float) -> void:
if Input.is_action_just_pressed("lclick") and not Persister.get_value("game_started"):
Persister.persist_data("game_started", true)
animation_player.play("start")