feat: 添加 upgrade_panel UI样式

This commit is contained in:
luke358
2026-05-21 15:39:31 +08:00
parent 2ba69606ee
commit ce3813c5dc
6 changed files with 81 additions and 5 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ metadata/_custom_type_script = "uid://rw3gxqh858sr"
script = ExtResource("1_cx7cn") script = ExtResource("1_cx7cn")
from = 1 from = 1
to = 5 to = 5
wave_time = 5.0 wave_time = 25.0
units = Array[ExtResource("2_78wao")]([SubResource("Resource_3lh5k"), SubResource("Resource_aei4b"), SubResource("Resource_w8f67")]) units = Array[ExtResource("2_78wao")]([SubResource("Resource_3lh5k"), SubResource("Resource_aei4b"), SubResource("Resource_w8f67")])
spawn_type = 0 spawn_type = 0
fixed_spawn_time = 0.5 fixed_spawn_time = 0.5
+5 -2
View File
@@ -61,5 +61,8 @@ label_settings = SubResource("LabelSettings_mkexl")
vertical_alignment = 1 vertical_alignment = 1
[node name="CustomButton" parent="MarginContainer/Control" unique_id=667533022 instance=ExtResource("4_kjnsj")] [node name="CustomButton" parent="MarginContainer/Control" unique_id=667533022 instance=ExtResource("4_kjnsj")]
layout_mode = 0 custom_minimum_size = Vector2(260, 0)
anchors_preset = 0 layout_mode = 1
offset_left = -130.0
offset_top = -58.0
offset_right = 130.0
+11
View File
@@ -0,0 +1,11 @@
extends Panel
class_name UpgradePanel
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
@@ -0,0 +1 @@
uid://ybrs54qn38co
@@ -0,0 +1,61 @@
[gd_scene format=3 uid="uid://dufaahmv0ednv"]
[ext_resource type="PackedScene" uid="uid://cp1haphh1gj8t" path="res://scenes/ui/stats_container/stats_container.tscn" id="1_6gbsu"]
[ext_resource type="PackedScene" uid="uid://bfohai4xgom8w" path="res://scenes/ui/upgrade_card/upgrade_card.tscn" id="1_52meh"]
[ext_resource type="Script" uid="uid://ybrs54qn38co" path="res://scenes/ui/upgrade_panel/upgrade_panel.gd" id="1_l8hix"]
[sub_resource type="LabelSettings" id="LabelSettings_52meh"]
font_size = 120
[node name="UpgradePanel" type="Panel" unique_id=35283646]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_l8hix")
[node name="MarginContainer" type="MarginContainer" parent="." unique_id=717346648]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer" unique_id=59867515]
layout_mode = 2
theme_override_constants/separation = 64
alignment = 1
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/HBoxContainer" unique_id=1605862106]
layout_mode = 2
theme_override_constants/separation = 64
alignment = 1
[node name="Label" type="Label" parent="MarginContainer/HBoxContainer/VBoxContainer" unique_id=159385587]
layout_mode = 2
text = "wave completed"
label_settings = SubResource("LabelSettings_52meh")
horizontal_alignment = 1
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/HBoxContainer/VBoxContainer" unique_id=1404961884]
layout_mode = 2
theme_override_constants/separation = 24
[node name="UpgradeCard" parent="MarginContainer/HBoxContainer/VBoxContainer/HBoxContainer" unique_id=816521847 instance=ExtResource("1_52meh")]
layout_mode = 2
[node name="UpgradeCard2" parent="MarginContainer/HBoxContainer/VBoxContainer/HBoxContainer" unique_id=1406935808 instance=ExtResource("1_52meh")]
layout_mode = 2
[node name="UpgradeCard3" parent="MarginContainer/HBoxContainer/VBoxContainer/HBoxContainer" unique_id=541592257 instance=ExtResource("1_52meh")]
layout_mode = 2
[node name="UpgradeCard4" parent="MarginContainer/HBoxContainer/VBoxContainer/HBoxContainer" unique_id=813421337 instance=ExtResource("1_52meh")]
layout_mode = 2
[node name="StatsContainer" parent="MarginContainer/HBoxContainer" unique_id=827713059 instance=ExtResource("1_6gbsu")]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
+2 -2
View File
@@ -28,8 +28,8 @@ func _ready() -> void:
#add_weapon(preload("uid://bxlu2qkyn4xqf")) #add_weapon(preload("uid://bxlu2qkyn4xqf"))
#add_weapon(preload("uid://0388m8srn1no")) #add_weapon(preload("uid://0388m8srn1no"))
#add_weapon(preload("uid://cwpf4ko1wqfw")) #add_weapon(preload("uid://cwpf4ko1wqfw"))
#add_weapon(preload("uid://dgiq00qbjoc2w")) add_weapon(preload("uid://dgiq00qbjoc2w"))
#add_weapon(preload("uid://cyobkqxhoqqbq")) add_weapon(preload("uid://cyobkqxhoqqbq"))