1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-10 21:57:12 +08:00

refactor(武器系统): 重构武器冷却和攻击逻辑

- 将CooldownTimer的startCooldown方法重命名为更简洁的start
- 为EntityBase添加weaponStore节点管理武器
- 修改武器攻击逻辑,现在由Weapon类自身处理冷却和攻击
- 调整武器卡片的UI布局和描述居中显示
- 为Rooster角色添加预设武器
This commit is contained in:
2025-09-06 07:40:21 +08:00
parent c16a1ee73c
commit debb450044
8 changed files with 51 additions and 18 deletions
+3
View File
@@ -258,6 +258,9 @@ alpha_curve = SubResource("CurveTexture_vvfxd")
[node name="EntityBase" type="CharacterBody2D"]
script = ExtResource("1_mvol6")
[node name="weaponStore" type="Node2D" parent="."]
unique_name_in_owner = true
[node name="sounds" type="Node2D" parent="."]
unique_name_in_owner = true
+2 -2
View File
@@ -23,7 +23,7 @@ corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
[node name="WeaponCard" type="PanelContainer"]
offset_right = 300.0
offset_right = 350.0
offset_bottom = 304.0
theme_override_styles/panel = SubResource("StyleBoxFlat_n2ewr")
script = ExtResource("1_g802t")
@@ -32,6 +32,7 @@ metadata/_edit_lock_ = true
[node name="container" type="VBoxContainer" parent="."]
layout_mode = 2
theme_override_constants/separation = 10
alignment = 1
[node name="selectBtn" type="Button" parent="container"]
unique_name_in_owner = true
@@ -80,7 +81,6 @@ quality = 1
[node name="description" type="RichTextLabel" parent="container"]
unique_name_in_owner = true
layout_mode = 2
size_flags_vertical = 0
bbcode_enabled = true
text = "造成[color=cyan]10.0[/color]点伤害。"
fit_content = true