feat(英雄视图): 根据英雄等级调整顶部节点垂直位置
将静态的垂直位置改为基于英雄等级动态计算,使不同等级的英雄在视觉上有所区分
This commit is contained in:
@@ -115,7 +115,7 @@ export class HeroViewComp extends CCComp {
|
|||||||
private initUINodes() {
|
private initUINodes() {
|
||||||
this.top_node = this.node.getChildByName("top");
|
this.top_node = this.node.getChildByName("top");
|
||||||
this.topOpacity = this.top_node.getComponent(UIOpacity) || this.top_node.addComponent(UIOpacity);
|
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();
|
this.topBasePos = this.top_node.position.clone();
|
||||||
const hpNode = this.top_node.getChildByName("hp");
|
const hpNode = this.top_node.getChildByName("hp");
|
||||||
if(this.model.fac==FacSet.HERO){
|
if(this.model.fac==FacSet.HERO){
|
||||||
|
|||||||
Reference in New Issue
Block a user