did some tinkering with the hud

This commit is contained in:
Derek
2025-03-04 21:09:27 -06:00
parent 5d989470a6
commit 0da561f425
6 changed files with 18 additions and 6 deletions

View File

@@ -72,8 +72,9 @@ func _process(delta: float) -> void:
if player != null:
# Crosshair
var velocity_adjust = clamp(player.velocity.length() * .1,1,3)
crosshair_target = lerp(crosshair_target,CROSSHAIR_SIZE,delta * 5)
crosshair.size = lerp(crosshair.size, crosshair_target,delta * 20)
crosshair.size = lerp(crosshair.size, crosshair_target * velocity_adjust,delta * 20)
crosshair.position = Vector2(viewportWidth/2,viewportHeight/2) + (crosshair.size/-2)
crosshair_center.position = Vector2(viewportWidth/2,viewportHeight/2) + (crosshair_center.scale * crosshair_center.size/-2)
stamina_bar.scale = (crosshair.size/CROSSHAIR_SIZE) * Vector2(.185,.185)
@@ -218,5 +219,4 @@ func spawn_notifs():
can_spawn = true
func player_hit():
pass
#self.position += wiggle_element(25)
crosshair_size_change()