feat: added health percentage to HUD

This commit is contained in:
Sara 2025-08-30 23:08:16 +02:00
parent a2c80df0b8
commit efe5607f60
3 changed files with 53 additions and 1 deletions

View file

@ -1,4 +1,28 @@
[gd_scene format=3 uid="uid://dqo1pfy3r00ai"]
[gd_scene load_steps=3 format=3 uid="uid://dqo1pfy3r00ai"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_sbqmm"]
content_margin_left = 2.0
content_margin_top = 2.0
content_margin_right = 2.0
content_margin_bottom = 2.0
bg_color = Color(0.43, 0.43, 0.43, 1)
corner_radius_top_left = 6
corner_radius_top_right = 6
corner_radius_bottom_right = 6
corner_radius_bottom_left = 6
corner_detail = 6
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_hsy36"]
content_margin_left = 2.0
content_margin_top = 2.0
content_margin_right = 2.0
content_margin_bottom = 2.0
bg_color = Color(0.45, 0.198, 0.198, 1)
corner_radius_top_left = 6
corner_radius_top_right = 6
corner_radius_bottom_right = 6
corner_radius_bottom_left = 6
corner_detail = 6
[node name="HeadsUpDisplay" type="HeadsUpDisplay"]
anchors_preset = 15
@ -32,3 +56,19 @@ offset_bottom = 44.0
grow_horizontal = 2
horizontal_alignment = 1
vertical_alignment = 2
[node name="Healthbar" type="ProgressBar" parent="."]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
offset_top = -37.0
offset_right = 280.0
grow_vertical = 0
theme_override_styles/background = SubResource("StyleBoxFlat_sbqmm")
theme_override_styles/fill = SubResource("StyleBoxFlat_hsy36")
max_value = 1.0
value = 1.0
rounded = true
show_percentage = false