diff --git a/assets/resources/game/heros/top.prefab b/assets/resources/game/heros/top.prefab index ad1a1b30..9b295612 100644 --- a/assets/resources/game/heros/top.prefab +++ b/assets/resources/game/heros/top.prefab @@ -859,7 +859,7 @@ "_contentSize": { "__type__": "cc.Size", "width": 40, - "height": 7 + "height": 11 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -1037,7 +1037,7 @@ "_contentSize": { "__type__": "cc.Size", "width": 140, - "height": 30 + "height": 43.333333333333336 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -1162,7 +1162,7 @@ "_contentSize": { "__type__": "cc.Size", "width": 40, - "height": 7 + "height": 11 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -1912,8 +1912,8 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 52, - "height": 75 + "width": 80, + "height": 100 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -1943,18 +1943,18 @@ "_dstBlendFactor": 4, "_color": { "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, + "r": 253, + "g": 213, + "b": 0, "a": 255 }, "_spriteFrame": { - "__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@5c7a0", + "__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@79d6f", "__expectedType__": "cc.SpriteFrame" }, "_type": 0, "_fillType": 0, - "_sizeMode": 1, + "_sizeMode": 0, "_fillCenter": { "__type__": "cc.Vec2", "x": 0, @@ -1964,7 +1964,10 @@ "_fillRange": 0, "_isTrimmedMode": true, "_useGrayscale": false, - "_atlas": null, + "_atlas": { + "__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73", + "__expectedType__": "cc.SpriteAtlas" + }, "_id": "" }, { @@ -2007,8 +2010,8 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": 0, - "y": 0, + "x": -0.103, + "y": -0.601, "z": 0 }, "_lrot": { @@ -2048,7 +2051,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 4.38, + "width": 7.29, "height": 40 }, "_anchorPoint": { @@ -2087,8 +2090,8 @@ "_string": "1", "_horizontalAlign": 1, "_verticalAlign": 1, - "_actualFontSize": 15, - "_fontSize": 15, + "_actualFontSize": 25, + "_fontSize": 25, "_fontFamily": "Arial", "_lineHeight": 40, "_overflow": 0, @@ -2100,7 +2103,7 @@ "_isSystemFontUsed": false, "_spacingX": 0, "_isItalic": false, - "_isBold": false, + "_isBold": true, "_isUnderline": false, "_underlineHeight": 2, "_cacheMode": 0, @@ -2161,7 +2164,7 @@ "_contentSize": { "__type__": "cc.Size", "width": 10, - "height": 10 + "height": 13 }, "_anchorPoint": { "__type__": "cc.Vec2", diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index bfd3bbee..9294e997 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -38,8 +38,8 @@ export class HeroViewComp extends CCComp { realDeadTime: number = 0.1 deadCD: number = 0 monDeadTime: number = 0.1 - hp_height: number = 70 - boss_hp_height: number = 140 + hp_height: number = 90 + boss_hp_height: number = 160 // 血条显示相关 lastBarUpdateTime: number = 0; // 最后一次血条/蓝条/护盾更新时间 // ==================== UI 节点引用 ==================== @@ -117,7 +117,8 @@ export class HeroViewComp extends CCComp { /** 方向 */ this.node.setScale(this.scale * Math.abs(this.node.scale.x), 1 * this.node.scale.y); // 确保 scale.x 为正后再乘方向 - this.top_node.setScale(this.scale * this.top_node.scale.x, 1 * this.top_node.scale.y); + // top_node 取 abs 避免对象池复用时 scale 累乘导致血条方向反转 + this.top_node.setScale(this.scale * Math.abs(this.top_node.scale.x), 1 * this.top_node.scale.y); /* 显示角色血*/ this.top_node.getChildByName("hp").active = true; this.top_node.getChildByName("cd").active = false;