diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index 05a2e923..00bcfb01 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -166,11 +166,8 @@ export class HeroViewComp extends CCComp { /** 显示护盾 */ private show_shield(shield: number = 0, shield_max: number = 0) { this.lastBarUpdateTime = Date.now() / 1000; - let shield_progress = shield / shield_max; this.node.getChildByName("shielded").active = shield > 0; - this.top_node.getChildByName("shield").active = shield > 0; - this.top_node.getChildByName("shield").getComponent(ProgressBar).progress = shield_progress; - this.setTopBarOpacity(false); + void shield_max; } /** 显示血量 */ @@ -200,9 +197,7 @@ export class HeroViewComp extends CCComp { private isFullHpAndNoShield(): boolean { if (!this.model) return false; if (this.model.hp_max <= 0) return false; - const isFullHp = this.model.hp >= this.model.hp_max; - const noShield = this.model.shield <= 0; - return isFullHp && noShield; + return this.model.hp >= this.model.hp_max; } private setTopBarOpacity(isActive: boolean) {