From 8780086b509faf6a117c75d5e3f3d7aeef652992 Mon Sep 17 00:00:00 2001 From: walkpan Date: Sat, 3 Jan 2026 00:01:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(hero):=20=E7=A7=BB=E9=99=A4=E8=93=9D?= =?UTF-8?q?=E6=9D=A1=E6=98=BE=E7=A4=BA=E9=80=BB=E8=BE=91=E5=8F=8A=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=9B=B4=E6=96=B0=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 由于怪物不需要显示蓝条,直接移除蓝条的显示逻辑及相关更新检查,简化代码 --- assets/script/game/hero/HeroViewComp.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index c444693c..adf97882 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -104,10 +104,9 @@ export class HeroViewComp extends CCComp { /* 显示角色血*/ this.top_node.getChildByName("hp").active = true; - // 🔥 怪物不显示蓝条 - if (this.model) { - this.top_node.getChildByName("mp").active = this.model.fac === FacSet.HERO; - } + + this.top_node.getChildByName("mp").active = false + this.top_node.getChildByName("shield").active = false; // 初始隐藏血条(有更新时才显示) this.top_node.active = false; @@ -160,10 +159,10 @@ export class HeroViewComp extends CCComp { this.model.dirty_hp = false; } - if (this.model.dirty_mp) { - this.mp_show(); - this.model.dirty_mp = false; - } + // if (this.model.dirty_mp) { + // this.mp_show(); + // this.model.dirty_mp = false; + // } if (this.model.dirty_shield) { this.show_shield(this.model.shield, this.model.Attrs[Attrs.SHIELD_MAX]);