完成开箱抽卡 和 怪物掉落设置

This commit is contained in:
2025-01-19 23:43:14 +08:00
parent cebf09a58c
commit d756516cc6
30 changed files with 51192 additions and 38040 deletions

View File

@@ -55,25 +55,17 @@ export class HeroSelectComp extends CCComp {
this.node.getChildByName("show").active=val
}
update_data(){
let slv = this.node.getChildByName("slv")
// let slv = this.node.getChildByName("slv")
this.node.getChildByName("lv").getComponent(Label).string=smc.heros[this.h_uuid].lv.toString()+"级"
if(smc.heros[this.h_uuid].slv==0){
slv.active=false
}else{
slv.active=true
slv.getChildByName("slv").getComponent(Label).string=smc.heros[this.h_uuid].slv.toString()
}
switch(HeroInfo[this.h_uuid].quality){
case 1:
this.node.getChildByName("bg").getComponent(Sprite).color= new Color().fromHEX(ColorSet["BLUE"]);
break;
case 2:
this.node.getChildByName("bg").getComponent(Sprite).color= new Color().fromHEX(ColorSet["YELLOW"]);
break;
case 3:
this.node.getChildByName("bg").getComponent(Sprite).color= new Color().fromHEX(ColorSet["RED"]);
break;
}
// if(smc.heros[this.h_uuid].slv==0){
// slv.active=false
// }else{
// slv.active=true
// slv.getChildByName("slv").getComponent(Label).string=smc.heros[this.h_uuid].slv.toString()
// }
this.node.getChildByName("g1").active=HeroInfo[this.h_uuid].quality==1
this.node.getChildByName("g2").active=HeroInfo[this.h_uuid].quality==2
this.node.getChildByName("g3").active=HeroInfo[this.h_uuid].quality==3
}
/** 全局消息逻辑处理 */
// private onHandler(event: string, args: any) {