This commit is contained in:
Jennie Robinson Faber 2026-05-10 23:56:09 +01:00
parent 7ce2863cfd
commit e216364ec1
12 changed files with 84 additions and 71 deletions

View file

@ -1,5 +1,7 @@
extends Node
const STARTING_FLOOR := 10
@warning_ignore_start("unused_signal")
signal floor_changed(floor_num: int)

11
scripts/ui_utils.gd Normal file
View file

@ -0,0 +1,11 @@
class_name UIUtils
static func flip_label_text(label: Label, new_text: String, duration: float = 0.15) -> void:
label.pivot_offset = Vector2(0, label.size.y)
var tween = label.create_tween()
tween.tween_property(label, "scale:y", 0.0, duration).set_trans(Tween.TRANS_CUBIC).set_ease(Tween.EASE_IN)
tween.tween_callback(func():
label.text = new_text
label.pivot_offset = Vector2.ZERO
)
tween.tween_property(label, "scale:y", 1.0, duration).set_trans(Tween.TRANS_CUBIC).set_ease(Tween.EASE_OUT)

1
scripts/ui_utils.gd.uid Normal file
View file

@ -0,0 +1 @@
uid://bp4uktnrbpag8