ui 整体修改
This commit is contained in:
@@ -25,14 +25,9 @@ export class HeroSelect extends ecs.Entity {
|
||||
const sprite = node.getChildByName("Mask").getChildByName("hero").getComponent(Sprite);
|
||||
sprite.spriteFrame = atlas.getSpriteFrame(HeroInfo[uuid].path);
|
||||
});
|
||||
node.getChildByName("lv").getComponent(Label).string = smc.heros[uuid].lv.toString()+"级";
|
||||
if(smc.heros[uuid].slv>=1) {slv.getChildByName("s1").active=true} else {slv.getChildByName("s1").active=false};
|
||||
if(smc.heros[uuid].slv>=2) {slv.getChildByName("s2").active=true} else {slv.getChildByName("s2").active=false};
|
||||
if(smc.heros[uuid].slv>=3) {slv.getChildByName("s3").active=true} else {slv.getChildByName("s3").active=false};
|
||||
if(smc.heros[uuid].slv>=4) {slv.getChildByName("s4").active=true} else {slv.getChildByName("s4").active=false};
|
||||
if(smc.heros[uuid].slv>=5) {slv.getChildByName("s5").active=true} else {slv.getChildByName("s5").active=false};
|
||||
let hcc = node.getComponent(HeroSelectComp)!;
|
||||
hcc.h_uuid = uuid;
|
||||
hcc.update_data();
|
||||
this.add(hcc);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user