From b013086567016bfecfc57a67a4220c704d63f2f5 Mon Sep 17 00:00:00 2001 From: panw Date: Wed, 1 Apr 2026 10:26:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=E8=8B=B1=E9=9B=84?= =?UTF-8?q?=E9=A1=B6=E9=83=A8UI=E4=BD=8D=E7=BD=AE=E5=92=8C=E5=B0=BA?= =?UTF-8?q?=E5=AF=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将ha1.prefab中顶部节点的Y坐标从90.171改为80 - HeroViewComp中顶部节点位置不再随等级变化,固定为Y=80 - 始终显示顶部血条,不再根据血量条件隐藏 - 调整top.prefab中多个UI元素的位置和尺寸,包括血条长度从50改为40,容器宽度从173改为140 --- assets/resources/game/heros/ha1.prefab | 2 +- assets/resources/game/heros/top.prefab | 10 +++++----- assets/script/game/hero/HeroViewComp.ts | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/assets/resources/game/heros/ha1.prefab b/assets/resources/game/heros/ha1.prefab index 4fd55ff3..6a9c9904 100644 --- a/assets/resources/game/heros/ha1.prefab +++ b/assets/resources/game/heros/ha1.prefab @@ -560,7 +560,7 @@ "value": { "__type__": "cc.Vec3", "x": 0, - "y": 90.171, + "y": 80, "z": 0 } }, diff --git a/assets/resources/game/heros/top.prefab b/assets/resources/game/heros/top.prefab index 6e768824..87f5fd7a 100644 --- a/assets/resources/game/heros/top.prefab +++ b/assets/resources/game/heros/top.prefab @@ -817,7 +817,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": -25, + "x": -20, "y": 0, "z": 0 }, @@ -858,7 +858,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 50, + "width": 40, "height": 10 }, "_anchorPoint": { @@ -1036,7 +1036,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 173.33333333333334, + "width": 140, "height": 40 }, "_anchorPoint": { @@ -1161,7 +1161,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 50, + "width": 40, "height": 10 }, "_anchorPoint": { @@ -1239,7 +1239,7 @@ "__id__": 36 }, "_mode": 0, - "_totalLength": 50, + "_totalLength": 40, "_progress": 1, "_reverse": false, "_id": "" diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index b5d76394..a26ee146 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -113,7 +113,7 @@ export class HeroViewComp extends CCComp { private initUINodes() { this.top_node = this.node.getChildByName("top"); this.topOpacity = this.top_node.getComponent(UIOpacity) || this.top_node.addComponent(UIOpacity); - this.top_node.setPosition(0, 90+this.model.lv*10, 0); + this.top_node.setPosition(0, 80, 0); this.topBasePos = this.top_node.position.clone(); const hpNode = this.top_node.getChildByName("hp"); if(this.model.fac==FacSet.HERO){ @@ -209,7 +209,7 @@ export class HeroViewComp extends CCComp { this.top_node.active = true; return; } - this.top_node.active = !this.isFullHpAndNoShield(); + this.top_node.active = true; } private activateTopBar() {