Snake/uiman.gd

18 lines
487 B
GDScript3
Raw Normal View History

2025-09-02 23:17:10 +10:00
extends Control
@export var food_bar : ProgressBar
@export var snake_manager : Node2D
2025-09-02 23:54:19 +10:00
@export var score_label : Label
2025-09-02 23:17:10 +10:00
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
food_bar.max_value = snake_manager.max_food
food_bar.value = snake_manager.food
2025-09-02 23:54:19 +10:00
score_label.text = str(snake_manager.score)