mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-13 05:05:55 +00:00
Health and shield gauges
This commit is contained in:
parent
9e04056800
commit
3682de18d5
14 changed files with 188 additions and 22 deletions
|
|
@ -1,7 +1,8 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://dkwi1hu1bixoe"]
|
||||
[gd_scene load_steps=12 format=3 uid="uid://dkwi1hu1bixoe"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Hud.cs" id="1_m0hb0"]
|
||||
[ext_resource type="FontFile" uid="uid://ccm3u37q1hvux" path="res://fonts/Xolonium-Regular.ttf" id="2_0xmx2"]
|
||||
[ext_resource type="LabelSettings" uid="uid://buk3e7bbwmnv1" path="res://Resources/Styles/Hud_Text_Style.tres" id="2_x7kl7"]
|
||||
[ext_resource type="Texture2D" uid="uid://dde36pgb8fbwc" path="res://Sprites/selector_big.png" id="3_hee3i"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_h626b"]
|
||||
|
|
@ -26,10 +27,32 @@ animations = [{
|
|||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[node name="HUD" type="CanvasLayer" node_paths=PackedStringArray("_healthLabel", "_itemsContainer")]
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_wu6au"]
|
||||
bg_color = Color(0.437742, 0.0512416, 0.0286274, 1)
|
||||
border_color = Color(0.197934, 0.0027957, 1.8049e-08, 1)
|
||||
anti_aliasing = false
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_5f4mf"]
|
||||
bg_color = Color(0.958101, 0.255223, 3.85046e-07, 1)
|
||||
anti_aliasing = false
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_crjx4"]
|
||||
bg_color = Color(0.120626, 7.70092e-07, 0.682086, 1)
|
||||
border_color = Color(0.197934, 0.0027957, 1.8049e-08, 1)
|
||||
anti_aliasing = false
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_rxnbp"]
|
||||
bg_color = Color(0.338981, 0.507716, 0.996646, 1)
|
||||
anti_aliasing = false
|
||||
|
||||
[node name="HUD" type="CanvasLayer" node_paths=PackedStringArray("_healthLabel", "_healthBar", "_shieldLabel", "_shieldBar", "_itemsContainer")]
|
||||
script = ExtResource("1_m0hb0")
|
||||
_healthLabel = NodePath("VBoxContainer/HealthLabel")
|
||||
_healthLabel = NodePath("VBoxContainer/HealthBarContainer/HealthLabel")
|
||||
_healthBar = NodePath("VBoxContainer/HealthBarContainer/HealthBar")
|
||||
_shieldLabel = NodePath("VBoxContainer/ShieldBarContainer/ShieldLabel")
|
||||
_shieldBar = NodePath("VBoxContainer/ShieldBarContainer/ShieldBar")
|
||||
_itemsContainer = NodePath("VBoxContainer/ItemsContainer")
|
||||
_labelSettings = ExtResource("2_x7kl7")
|
||||
|
||||
[node name="GameOver" type="Label" parent="."]
|
||||
visible = false
|
||||
|
|
@ -65,18 +88,48 @@ anchor_right = 1.0
|
|||
anchor_bottom = 1.0
|
||||
offset_left = 4.0
|
||||
offset_top = 6.0
|
||||
offset_right = -4.0
|
||||
offset_right = -235.0
|
||||
offset_bottom = -3.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
theme_override_constants/separation = 0
|
||||
|
||||
[node name="HealthLabel" type="Label" parent="VBoxContainer"]
|
||||
[node name="HealthBarContainer" type="HBoxContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HealthBar" type="ProgressBar" parent="VBoxContainer/HealthBarContainer"]
|
||||
custom_minimum_size = Vector2(32, 8)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
theme_override_styles/background = SubResource("StyleBoxFlat_wu6au")
|
||||
theme_override_styles/fill = SubResource("StyleBoxFlat_5f4mf")
|
||||
value = 50.0
|
||||
show_percentage = false
|
||||
|
||||
[node name="HealthLabel" type="Label" parent="VBoxContainer/HealthBarContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_fonts/font = ExtResource("2_0xmx2")
|
||||
theme_override_font_sizes/font_size = 12
|
||||
text = "100/100"
|
||||
label_settings = ExtResource("2_x7kl7")
|
||||
|
||||
[node name="ShieldBarContainer" type="HBoxContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ShieldBar" type="ProgressBar" parent="VBoxContainer/ShieldBarContainer"]
|
||||
custom_minimum_size = Vector2(32, 8)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
theme_override_styles/background = SubResource("StyleBoxFlat_crjx4")
|
||||
theme_override_styles/fill = SubResource("StyleBoxFlat_rxnbp")
|
||||
value = 50.0
|
||||
show_percentage = false
|
||||
|
||||
[node name="ShieldLabel" type="Label" parent="VBoxContainer/ShieldBarContainer"]
|
||||
layout_mode = 2
|
||||
text = "100/100"
|
||||
label_settings = ExtResource("2_x7kl7")
|
||||
|
||||
[node name="ItemsContainer" type="VBoxContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue