feat(英雄视图): 根据英雄等级调整顶部节点垂直位置

将静态的垂直位置改为基于英雄等级动态计算,使不同等级的英雄在视觉上有所区分
This commit is contained in:
panw
2026-03-24 16:27:40 +08:00
parent f9012458d8
commit 76633e44d3

View File

@@ -115,7 +115,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, 100, 0);
this.top_node.setPosition(0, 90+this.model.lv*10, 0);
this.topBasePos = this.top_node.position.clone();
const hpNode = this.top_node.getChildByName("hp");
if(this.model.fac==FacSet.HERO){