fix: 调整英雄顶部UI位置和尺寸
- 将ha1.prefab中顶部节点的Y坐标从90.171改为80 - HeroViewComp中顶部节点位置不再随等级变化,固定为Y=80 - 始终显示顶部血条,不再根据血量条件隐藏 - 调整top.prefab中多个UI元素的位置和尺寸,包括血条长度从50改为40,容器宽度从173改为140
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user