feat: 1.添加统计面板, 2. 游戏暂停标志 Global.paused

This commit is contained in:
luke358
2026-05-20 21:05:04 +08:00
parent 651eaf71ee
commit 4a3cd81ff7
13 changed files with 464 additions and 338 deletions
@@ -0,0 +1,332 @@
[gd_scene format=3 uid="uid://cp1haphh1gj8t"]
[ext_resource type="Script" uid="uid://degcm5yugr3et" path="res://scenes/ui/stats_container/stats_container.gd" id="1_agl2i"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_agl2i"]
bg_color = Color(0.09803922, 0.09803922, 0.09803922, 1)
corner_radius_top_left = 16
corner_radius_top_right = 16
corner_radius_bottom_right = 16
corner_radius_bottom_left = 16
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_q67w4"]
bg_color = Color(0.039215688, 0.7137255, 0.8784314, 0.3137255)
corner_radius_top_left = 8
corner_radius_top_right = 8
corner_radius_bottom_right = 8
corner_radius_bottom_left = 8
corner_detail = 5
[sub_resource type="LabelSettings" id="LabelSettings_agl2i"]
font_size = 24
[node name="StatsContainer" type="Panel" unique_id=827713059]
custom_minimum_size = Vector2(480, 550)
offset_right = 40.0
offset_bottom = 40.0
theme_override_styles/panel = SubResource("StyleBoxFlat_agl2i")
script = ExtResource("1_agl2i")
[node name="MarginContainer" type="MarginContainer" parent="." unique_id=407365169]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 16
theme_override_constants/margin_top = 16
theme_override_constants/margin_right = 16
theme_override_constants/margin_bottom = 16
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer" unique_id=1469773019]
layout_mode = 2
theme_override_constants/separation = 12
[node name="StatsHealth" type="Panel" parent="MarginContainer/VBoxContainer" unique_id=1095380227]
custom_minimum_size = Vector2(0, 45)
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_q67w4")
[node name="Title" type="Label" parent="MarginContainer/VBoxContainer/StatsHealth" unique_id=33041130]
layout_mode = 1
anchors_preset = 4
anchor_top = 0.5
anchor_bottom = 0.5
offset_left = 5.0
offset_top = -14.5
offset_right = 107.0
offset_bottom = 14.5
grow_vertical = 2
text = "max hp:"
label_settings = SubResource("LabelSettings_agl2i")
[node name="HealthLabel" type="Label" parent="MarginContainer/VBoxContainer/StatsHealth" unique_id=637203362]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 6
anchor_left = 1.0
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_left = -112.0
offset_top = -14.5
offset_right = -10.0
offset_bottom = 14.5
grow_horizontal = 0
grow_vertical = 2
text = "10"
label_settings = SubResource("LabelSettings_agl2i")
horizontal_alignment = 2
[node name="StatsHPRegen" type="Panel" parent="MarginContainer/VBoxContainer" unique_id=749196644]
custom_minimum_size = Vector2(0, 45)
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_q67w4")
[node name="Title" type="Label" parent="MarginContainer/VBoxContainer/StatsHPRegen" unique_id=81430696]
layout_mode = 1
anchors_preset = 4
anchor_top = 0.5
anchor_bottom = 0.5
offset_left = 5.0
offset_top = -14.5
offset_right = 107.0
offset_bottom = 14.5
grow_vertical = 2
text = "hp regen:"
label_settings = SubResource("LabelSettings_agl2i")
[node name="HPRegenLabel" type="Label" parent="MarginContainer/VBoxContainer/StatsHPRegen" unique_id=187882447]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 6
anchor_left = 1.0
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_left = -112.0
offset_top = -14.5
offset_right = -10.0
offset_bottom = 14.5
grow_horizontal = 0
grow_vertical = 2
text = "10"
label_settings = SubResource("LabelSettings_agl2i")
horizontal_alignment = 2
[node name="StatsLifeSteal" type="Panel" parent="MarginContainer/VBoxContainer" unique_id=1147906155]
custom_minimum_size = Vector2(0, 45)
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_q67w4")
[node name="Title" type="Label" parent="MarginContainer/VBoxContainer/StatsLifeSteal" unique_id=1864994055]
layout_mode = 1
anchors_preset = 4
anchor_top = 0.5
anchor_bottom = 0.5
offset_left = 5.0
offset_top = -14.5
offset_right = 107.0
offset_bottom = 14.5
grow_vertical = 2
text = "% life steal:"
label_settings = SubResource("LabelSettings_agl2i")
[node name="LifeStealLabel" type="Label" parent="MarginContainer/VBoxContainer/StatsLifeSteal" unique_id=202834641]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 6
anchor_left = 1.0
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_left = -112.0
offset_top = -14.5
offset_right = -10.0
offset_bottom = 14.5
grow_horizontal = 0
grow_vertical = 2
text = "10"
label_settings = SubResource("LabelSettings_agl2i")
horizontal_alignment = 2
[node name="StatsDamage" type="Panel" parent="MarginContainer/VBoxContainer" unique_id=1059591467]
custom_minimum_size = Vector2(0, 45)
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_q67w4")
[node name="Title" type="Label" parent="MarginContainer/VBoxContainer/StatsDamage" unique_id=175599987]
layout_mode = 1
anchors_preset = 4
anchor_top = 0.5
anchor_bottom = 0.5
offset_left = 5.0
offset_top = -14.5
offset_right = 107.0
offset_bottom = 14.5
grow_vertical = 2
text = "damage:"
label_settings = SubResource("LabelSettings_agl2i")
[node name="DamageLabel" type="Label" parent="MarginContainer/VBoxContainer/StatsDamage" unique_id=934876879]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 6
anchor_left = 1.0
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_left = -112.0
offset_top = -14.5
offset_right = -10.0
offset_bottom = 14.5
grow_horizontal = 0
grow_vertical = 2
text = "10"
label_settings = SubResource("LabelSettings_agl2i")
horizontal_alignment = 2
[node name="StatsLuck" type="Panel" parent="MarginContainer/VBoxContainer" unique_id=1150530464]
custom_minimum_size = Vector2(0, 45)
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_q67w4")
[node name="Title" type="Label" parent="MarginContainer/VBoxContainer/StatsLuck" unique_id=657472168]
layout_mode = 1
anchors_preset = 4
anchor_top = 0.5
anchor_bottom = 0.5
offset_left = 5.0
offset_top = -14.5
offset_right = 107.0
offset_bottom = 14.5
grow_vertical = 2
text = "luck:"
label_settings = SubResource("LabelSettings_agl2i")
[node name="LuckLabel" type="Label" parent="MarginContainer/VBoxContainer/StatsLuck" unique_id=78047560]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 6
anchor_left = 1.0
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_left = -112.0
offset_top = -14.5
offset_right = -10.0
offset_bottom = 14.5
grow_horizontal = 0
grow_vertical = 2
text = "10"
label_settings = SubResource("LabelSettings_agl2i")
horizontal_alignment = 2
[node name="StatsSpeed" type="Panel" parent="MarginContainer/VBoxContainer" unique_id=241478994]
custom_minimum_size = Vector2(0, 45)
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_q67w4")
[node name="Title" type="Label" parent="MarginContainer/VBoxContainer/StatsSpeed" unique_id=1544472169]
layout_mode = 1
anchors_preset = 4
anchor_top = 0.5
anchor_bottom = 0.5
offset_left = 5.0
offset_top = -14.5
offset_right = 107.0
offset_bottom = 14.5
grow_vertical = 2
text = "speed:"
label_settings = SubResource("LabelSettings_agl2i")
[node name="SpeedLabel" type="Label" parent="MarginContainer/VBoxContainer/StatsSpeed" unique_id=1954700526]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 6
anchor_left = 1.0
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_left = -112.0
offset_top = -14.5
offset_right = -10.0
offset_bottom = 14.5
grow_horizontal = 0
grow_vertical = 2
text = "10"
label_settings = SubResource("LabelSettings_agl2i")
horizontal_alignment = 2
[node name="StatsBlock" type="Panel" parent="MarginContainer/VBoxContainer" unique_id=1547358929]
custom_minimum_size = Vector2(0, 45)
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_q67w4")
[node name="Title" type="Label" parent="MarginContainer/VBoxContainer/StatsBlock" unique_id=117742420]
layout_mode = 1
anchors_preset = 4
anchor_top = 0.5
anchor_bottom = 0.5
offset_left = 5.0
offset_top = -14.5
offset_right = 107.0
offset_bottom = 14.5
grow_vertical = 2
text = "% block chance:"
label_settings = SubResource("LabelSettings_agl2i")
[node name="BlockLabel" type="Label" parent="MarginContainer/VBoxContainer/StatsBlock" unique_id=2127039878]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 6
anchor_left = 1.0
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_left = -112.0
offset_top = -14.5
offset_right = -10.0
offset_bottom = 14.5
grow_horizontal = 0
grow_vertical = 2
text = "10"
label_settings = SubResource("LabelSettings_agl2i")
horizontal_alignment = 2
[node name="StatsHarvesting" type="Panel" parent="MarginContainer/VBoxContainer" unique_id=69183424]
custom_minimum_size = Vector2(0, 45)
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_q67w4")
[node name="Title" type="Label" parent="MarginContainer/VBoxContainer/StatsHarvesting" unique_id=333754868]
layout_mode = 1
anchors_preset = 4
anchor_top = 0.5
anchor_bottom = 0.5
offset_left = 5.0
offset_top = -14.5
offset_right = 107.0
offset_bottom = 14.5
grow_vertical = 2
text = "harvesting:"
label_settings = SubResource("LabelSettings_agl2i")
[node name="HarvestingLabel" type="Label" parent="MarginContainer/VBoxContainer/StatsHarvesting" unique_id=1473863706]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 6
anchor_left = 1.0
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_left = -112.0
offset_top = -14.5
offset_right = -10.0
offset_bottom = 14.5
grow_horizontal = 0
grow_vertical = 2
text = "10"
label_settings = SubResource("LabelSettings_agl2i")
horizontal_alignment = 2