From b62e6649cba3f8bb8d4f8ef4a5a24e0fc16be655 Mon Sep 17 00:00:00 2001 From: panw Date: Tue, 24 Mar 2026 10:44:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=E7=94=9F=E5=91=BD?= =?UTF-8?q?=E5=80=BC=E7=89=B9=E6=95=88=E8=A7=A6=E5=8F=91=E9=98=88=E5=80=BC?= =?UTF-8?q?=E4=BB=8E99=E6=94=B9=E4=B8=BA20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 避免低生命值时频繁触发特效和提示,优化游戏体验。 --- assets/script/game/hero/HeroViewComp.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index 981aa2bd..642a9f44 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -367,7 +367,7 @@ export class HeroViewComp extends CCComp { health(hp: number = 0) { // ✅ 仅显示特效和提示,不调用 hp_show() - if(hp<=99) return; + if(hp<=20) return; this.heathed(); this.hp_tip(TooltipTypes.health, hp.toFixed(0)); this.lastBarUpdateTime = Date.now() / 1000;