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

@ -45,6 +45,8 @@ var gun_index := 0:
var gun: Gun:
get: return guns[gun_index]
var distance_traveled := 0.
func clean_angle(theta: float) -> float:
theta = fposmod(theta, TAU)
if theta < PI: return theta
@ -145,6 +147,7 @@ func _process(delta: float) -> void:
State.NORMAL: _process_movement(delta)
State.DASHING: _process_dash()
State.LOCKED: pass
distance_traveled += velocity.length() * delta
_process_aim()

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