tojam20-elevator/scenes/hud.gd
Jennie Robinson Faber feb467c832 Scoring, floor timer, and hud updates
- Move elevator panel logic out of HUD; HUD now listens for signals to update floor, saved, people, and score labels
- Add scaling rescue threshold that grows as you descend, with bonus points for exceeding it
- Add per-floor timer that triggers a losing when expired
- Add show_loss state on the screen for too-few-people and timeout failures
2026-05-09 15:43:08 +01:00

19 lines
623 B
GDScript

extends MarginContainer
func _ready():
$StatsColumn/FloorLabel.text = "FLOOR: 10"
$StatsColumn/SavedLabel.text = "SAVED: 0"
$StatsColumn/PeopleLabel.text = "PEOPLE: 0/2"
$StatsColumn/ScoreLabel.text = "SCORE: 0"
func update_floor(floor_num: int):
$StatsColumn/FloorLabel.text = "FLOOR: " + str(floor_num)
func update_saved(count: int):
$StatsColumn/SavedLabel.text = "SAVED: " + str(count)
func update_people(count: int, threshold: int):
$StatsColumn/PeopleLabel.text = "PEOPLE: " + str(count) + "/" + str(threshold)
func update_score(new_score: int):
$StatsColumn/ScoreLabel.text = "SCORE: " + str(new_score)