oh my god let's try this again

This commit is contained in:
2025-08-12 04:38:42 -04:00
parent 6ae54ccfdb
commit c53ce71f7f
805 changed files with 141853 additions and 0 deletions

26
scripts/hud_text.gd Normal file
View File

@@ -0,0 +1,26 @@
extends Label
var hud_scaling : float = 1.0
func update(player, walljump_timer, dash_timer):
var hp = "Health: " + str(player.hp)
var walljump_ready = "Walljump Ready"
var dash_ready = "Dash Ready"
if get_viewport_rect().size.x > 1280 and hud_scaling == 1.0:
hud_scaling = (get_viewport_rect().size.x / 1280)
get_parent().size = get_viewport_rect().size
get_parent().add_theme_constant_override("margin_top", 600 * hud_scaling)
get_parent().add_theme_constant_override("margin_right", 1000 * hud_scaling)
get_parent().add_theme_constant_override("margin_bottom", 20 * hud_scaling)
get_parent().add_theme_constant_override("margin_left", 20 * hud_scaling)
label_settings.font_size = int(25 * hud_scaling)
label_settings.outline_size = int(3 * hud_scaling)
if !player.walljump_ready:
walljump_ready = "Walljump in " + str("%.1f" % walljump_timer.time_left)
if player.dash_spent:
dash_ready = "Dash in " + str("%.1f" % dash_timer.time_left)
text = hp + "\n" + walljump_ready + "\n" + dash_ready