1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-09 13:17:12 +08:00

feat: 添加武器升华系统及相关UI组件

实现武器升华功能,包括:
- 新增SublimateOption类处理升华选项
- 添加SublimateOptionHandler UI组件
- 在武器卡片中集成升华界面
- 重构武器描述生成逻辑
- 新增钻石资源消耗机制
- 优化UI布局和样式
- 修复多处类型引用错误
This commit is contained in:
2026-05-10 11:49:17 +08:00
parent 1071e87da6
commit 7a0cf96d7d
39 changed files with 558 additions and 147 deletions
+30 -36
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=42 format=3 uid="uid://cvogxi7mktumf"]
[gd_scene format=3 uid="uid://cvogxi7mktumf"]
[ext_resource type="Script" uid="uid://ds3j3f82li68h" path="res://scripts/Statemachine/EntityBase.gd" id="1_mvol6"]
[ext_resource type="Texture2D" uid="uid://dwwpkn4q07ja2" path="res://icon.svg" id="2_7lpu0"]
@@ -346,86 +346,80 @@ alpha_curve = SubResource("CurveTexture_vvfxd")
[sub_resource type="CircleShape2D" id="CircleShape2D_34h7q"]
[node name="EntityBase" type="CharacterBody2D"]
[node name="EntityBase" type="CharacterBody2D" unique_id=335589593]
script = ExtResource("1_mvol6")
[node name="syncer" type="MultiplayerSynchronizer" parent="."]
[node name="syncer" type="MultiplayerSynchronizer" parent="." unique_id=410089973]
unique_name_in_owner = true
replication_config = SubResource("SceneReplicationConfig_tiuhe")
[node name="weaponStore" type="Node2D" parent="."]
[node name="weaponStore" type="Node2D" parent="." unique_id=1319091445]
unique_name_in_owner = true
[node name="sounds" type="Node2D" parent="."]
[node name="sounds" type="Node2D" parent="." unique_id=1554185633]
unique_name_in_owner = true
[node name="sprint" type="AudioStreamPlayer2D" parent="sounds"]
[node name="sprint" type="AudioStreamPlayer2D" parent="sounds" unique_id=771326921]
[node name="heal" type="AudioStreamPlayer2D" parent="sounds"]
[node name="heal" type="AudioStreamPlayer2D" parent="sounds" unique_id=522032588]
[node name="miss" type="AudioStreamPlayer2D" parent="sounds"]
[node name="miss" type="AudioStreamPlayer2D" parent="sounds" unique_id=254579113]
[node name="hurt" type="AudioStreamPlayer2D" parent="sounds"]
[node name="hurt" type="AudioStreamPlayer2D" parent="sounds" unique_id=540822672]
[node name="collect" type="AudioStreamPlayer2D" parent="sounds"]
[node name="collect" type="AudioStreamPlayer2D" parent="sounds" unique_id=1921709906]
stream = ExtResource("2_qt0aq")
[node name="die" type="AudioStreamPlayer2D" parent="sounds"]
[node name="die" type="AudioStreamPlayer2D" parent="sounds" unique_id=1599661867]
[node name="attack0" type="AudioStreamPlayer2D" parent="sounds"]
[node name="attack0" type="AudioStreamPlayer2D" parent="sounds" unique_id=244425603]
[node name="texture" type="AnimatedSprite2D" parent="."]
[node name="texture" type="AnimatedSprite2D" parent="." unique_id=1960766921]
unique_name_in_owner = true
position = Vector2(0, -50)
sprite_frames = SubResource("SpriteFrames_wcqpm")
animation = &"idle"
[node name="staticBackground" type="Sprite2D" parent="texture"]
[node name="staticBackground" type="Sprite2D" parent="texture" unique_id=226001108]
[node name="staticAnimation" type="AnimatedSprite2D" parent="texture"]
[node name="staticAnimation" type="AnimatedSprite2D" parent="texture" unique_id=2086220178]
sprite_frames = SubResource("SpriteFrames_tiuhe")
[node name="hurtbox" type="Area2D" parent="texture"]
[node name="hurtbox" type="Area2D" parent="texture" unique_id=1090146637]
unique_name_in_owner = true
[node name="hitbox" type="CollisionShape2D" parent="texture/hurtbox"]
[node name="hitbox" type="CollisionShape2D" parent="texture/hurtbox" unique_id=1089476696]
shape = SubResource("CircleShape2D_buhm1")
[node name="animator" type="AnimationPlayer" parent="texture"]
[node name="animator" type="AnimationPlayer" parent="texture" unique_id=998341823]
unique_name_in_owner = true
libraries = {
&"": SubResource("AnimationLibrary_daot2")
}
libraries/ = SubResource("AnimationLibrary_daot2")
[node name="animatree" type="AnimationTree" parent="texture/animator"]
[node name="animatree" type="AnimationTree" parent="texture/animator" unique_id=1984427152]
unique_name_in_owner = true
root_node = NodePath("%animator/..")
tree_root = SubResource("AnimationNodeBlendSpace1D_51ube")
anim_player = NodePath("..")
parameters/blend_position = 1.36
[node name="hurtAnimator" type="AnimationPlayer" parent="texture"]
[node name="hurtAnimator" type="AnimationPlayer" parent="texture" unique_id=975738660]
unique_name_in_owner = true
libraries = {
&"": SubResource("AnimationLibrary_kbmff")
}
libraries/ = SubResource("AnimationLibrary_kbmff")
[node name="stageAnimator" type="AnimationPlayer" parent="texture"]
[node name="stageAnimator" type="AnimationPlayer" parent="texture" unique_id=461345469]
unique_name_in_owner = true
libraries = {
&"": SubResource("AnimationLibrary_vvkcp")
}
libraries/ = SubResource("AnimationLibrary_vvkcp")
[node name="weapons" type="Node2D" parent="texture"]
[node name="weapons" type="Node2D" parent="texture" unique_id=1686065375]
unique_name_in_owner = true
[node name="trailParticle" type="GPUParticles2D" parent="texture"]
[node name="trailParticle" type="GPUParticles2D" parent="texture" unique_id=1437586204]
unique_name_in_owner = true
z_index = -1
amount = 300
process_material = SubResource("ParticleProcessMaterial_kndb2")
[node name="deadParticle" type="GPUParticles2D" parent="texture"]
[node name="deadParticle" type="GPUParticles2D" parent="texture" unique_id=1910187205]
unique_name_in_owner = true
emitting = false
amount = 100
@@ -433,13 +427,13 @@ one_shot = true
explosiveness = 1.0
process_material = SubResource("ParticleProcessMaterial_f3xas")
[node name="statebar" parent="." instance=ExtResource("2_uje1g")]
[node name="statebar" parent="." unique_id=1990457668 instance=ExtResource("2_uje1g")]
unique_name_in_owner = true
position = Vector2(0, -100)
[node name="damageAnchor" type="Node2D" parent="statebar"]
[node name="damageAnchor" type="Node2D" parent="statebar" unique_id=621457960]
unique_name_in_owner = true
position = Vector2(0, -20)
[node name="movebox" type="CollisionShape2D" parent="."]
[node name="movebox" type="CollisionShape2D" parent="." unique_id=1340839290]
shape = SubResource("CircleShape2D_34h7q")
+62 -2
View File
@@ -11,6 +11,8 @@
[ext_resource type="PackedScene" uid="uid://bbm8l3hr4ihar" path="res://components/UI/ItemShow.tscn" id="4_k01vb"]
[ext_resource type="Texture2D" uid="uid://clobdvvfmj618" path="res://resources/ui/downdate-soul.svg" id="5_j7v7d"]
[ext_resource type="Texture2D" uid="uid://lrvlfvt55j0" path="res://resources/ui/once-update.svg" id="5_jv1l6"]
[ext_resource type="Script" uid="uid://5r8mvbag4m0q" path="res://scripts/Statemachine/TextSwitchButton.gd" id="5_us21t"]
[ext_resource type="Texture2D" uid="uid://bbny26fysoh57" path="res://resources/ui/sublimate.png" id="8_75t4v"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_n2ewr"]
content_margin_left = 30.0
@@ -30,6 +32,20 @@ corner_radius_bottom_right = 15
corner_radius_bottom_left = 15
corner_detail = 1
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_mjvvk"]
content_margin_left = 30.0
content_margin_top = 20.0
content_margin_right = 30.0
content_margin_bottom = 20.0
bg_color = Color(0, 0, 0, 0.5)
border_width_top = 10
border_width_bottom = 10
border_color = Color(1, 1, 1, 1)
border_blend = true
corner_radius_top_right = 15
corner_radius_bottom_left = 15
corner_detail = 1
[sub_resource type="LabelSettings" id="LabelSettings_b3nsw"]
font_size = 12
font_color = Color(0.55, 0.55, 0.55, 1)
@@ -69,6 +85,31 @@ layout_mode = 2
theme_override_constants/separation = 10
alignment = 1
[node name="anchor" type="Control" parent="container" unique_id=870492027]
layout_mode = 2
[node name="climatePanel" type="PanelContainer" parent="container/anchor" unique_id=653448699]
layout_mode = 1
anchors_preset = -1
anchor_left = 1.15
anchor_right = 1.15
offset_right = 40.0
offset_bottom = 40.0
theme_override_styles/panel = SubResource("StyleBoxFlat_mjvvk")
[node name="wrapper" type="VBoxContainer" parent="container/anchor/climatePanel" unique_id=1097849201]
layout_mode = 2
theme_override_constants/separation = 15
[node name="title" type="Label" parent="container/anchor/climatePanel/wrapper" unique_id=2006348917]
layout_mode = 2
text = "升华"
[node name="sublimateOptions" type="VBoxContainer" parent="container/anchor/climatePanel/wrapper" unique_id=738429306]
unique_name_in_owner = true
layout_mode = 2
theme_override_constants/separation = 10
[node name="wrapper" type="VBoxContainer" parent="container" unique_id=673686123]
layout_mode = 2
@@ -81,8 +122,11 @@ layout_mode = 2
size_flags_horizontal = 3
theme = ExtResource("2_fwkd3")
toggle_mode = true
text = "动强化"
text = "动强化"
icon = ExtResource("4_h3enm")
script = ExtResource("5_us21t")
pressedText = "自动强化"
unpressedText = "手动强化"
[node name="onceUpdateBtn" type="Button" parent="container/wrapper/updates" unique_id=1523224875]
unique_name_in_owner = true
@@ -98,6 +142,22 @@ layout_mode = 2
theme = ExtResource("2_fwkd3")
text = "强化武器"
icon = ExtResource("4_do015")
alignment = 2
[node name="separator" type="HSeparator" parent="container/wrapper" unique_id=2079058077]
layout_mode = 2
theme = ExtResource("2_fwkd3")
[node name="climateBtn" type="Button" parent="container/wrapper" unique_id=390423731]
unique_name_in_owner = true
layout_mode = 2
theme = ExtResource("2_fwkd3")
text = "升华"
icon = ExtResource("8_75t4v")
alignment = 2
script = ExtResource("5_us21t")
pressedText = "凝华"
unpressedText = "升华"
[node name="souls" type="HBoxContainer" parent="container/wrapper" unique_id=1439164733]
layout_mode = 2
@@ -213,7 +273,7 @@ unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
bbcode_enabled = true
text = "[center]造成[color=cyan]10[/color]点伤害。[/center]"
text = "造成[color=cyan]10[/color]点伤害。"
fit_content = true
[node name="tease" type="Label" parent="container" unique_id=689277044]