From 75fbef88951088e4131386139402807a14d862ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=A8=E8=90=BD=E5=9F=BA=E5=9B=B4=E8=99=BE?= <3161880837@qq.com> Date: Tue, 5 May 2026 07:14:41 +0800 Subject: [PATCH] =?UTF-8?q?fix(EntityBase):=20=E4=BF=AE=E5=A4=8D=E7=8E=A9?= =?UTF-8?q?=E5=AE=B6=E8=A7=92=E8=89=B2=E6=AD=BB=E4=BA=A1=E6=97=B6=E8=A2=AB?= =?UTF-8?q?=E7=AB=8B=E5=8D=B3=E7=A7=BB=E9=99=A4=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改tryDie方法,仅当非玩家角色时才调用queue_free 同时更新牧羊犬角色的标语和配置 --- components/CharacterCards/MuyangDog.tscn | 5 +++-- scripts/Statemachine/EntityBase.gd | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/components/CharacterCards/MuyangDog.tscn b/components/CharacterCards/MuyangDog.tscn index a89abc8..f63bb07 100644 --- a/components/CharacterCards/MuyangDog.tscn +++ b/components/CharacterCards/MuyangDog.tscn @@ -17,11 +17,12 @@ corner_detail = 1 [node name="MuyangDog" unique_id=1046363300 instance=ExtResource("1_wq25g")] theme_override_styles/panel = SubResource("StyleBoxFlat_fi2nw") displayName = "牧羊犬" -slogan = "以身挡险,恪守使命不离不弃" +slogan = "恪守使命不离不弃" avatar = ExtResource("2_fi2nw") description = "每3秒发动格挡,弹反一切子弹。" fields = Array[int]([0, 8, 3]) fieldValues = Array[float]([50.0, 0.15, -0.2]) +clickToRebuild = true [node name="avatarTexture" parent="wrapper" parent_id_path=PackedInt32Array(2023039659) index="0" unique_id=1334645594] texture = ExtResource("2_fi2nw") @@ -30,7 +31,7 @@ texture = ExtResource("2_fi2nw") text = "牧羊犬" [node name="sloganLabel" parent="wrapper/infoContainer/VBoxContainer" parent_id_path=PackedInt32Array(533915880) index="1" unique_id=280562204] -text = "“以身挡险,恪守使命不离不弃”" +text = "“恪守使命不离不弃”" [node name="descriptionLabel" parent="wrapper/infoContainer" parent_id_path=PackedInt32Array(143242635) index="1" unique_id=808054282] text = "每3秒发动格挡,弹反一切子弹。" diff --git a/scripts/Statemachine/EntityBase.gd b/scripts/Statemachine/EntityBase.gd index d3e0761..2305218 100644 --- a/scripts/Statemachine/EntityBase.gd +++ b/scripts/Statemachine/EntityBase.gd @@ -448,7 +448,8 @@ func tryDie(by: BulletBase = null): UIState.showTip("[b]%s[/b] 已被打败!" % displayName, TipBox.MessageType.CONGRATULATION) elif isPlayer(): UIState.showTip("[b]%s[/b] 似了😭。" % displayName, TipBox.MessageType.ERROR) - queue_free() + if !isPlayer(): + queue_free() func tryHeal(count: float): playSound("heal") healed.emit(heal(count * fields.get(FieldStore.Entity.HEAL_ABILITY)))