lose screen UI; needs animation

This commit is contained in:
Michael Campbell 2026-04-14 13:46:24 -04:00
parent 28e8a4b6ac
commit 1d0032b587
10 changed files with 300 additions and 45 deletions

View file

@ -1,7 +1,10 @@
class_name ScoreLabel
extends Control
const DESIRED_SCALE := Vector2.ONE * .5
static var instance: ScoreLabel
@onready var label: Label = get_child(0)
var tween: Tween
var _display_score := 0
@ -23,6 +26,9 @@ var score := 0:
func exp_lerp(a: Variant, b: Variant, decay: float, dt: float) -> Variant:
return lerp(a, b, 1 - exp(-decay * dt))
func _init() -> void:
instance = self
func _ready() -> void:
scale = DESIRED_SCALE
score = score