英雄和卡片 联动完成

This commit is contained in:
2024-12-08 11:18:03 +08:00
parent aebe98577c
commit 59f965dc1c
4 changed files with 999 additions and 254 deletions

View File

@@ -111,6 +111,8 @@ export class HeroHomeComp extends CCComp {
attr2.getChildByName("cep").getChildByName("val").getComponent(Label).string = this.hero.cep
attr2.getChildByName("doep").getChildByName("val").getComponent(Label).string = this.hero.doep
attr2.getChildByName("dep").getChildByName("val").getComponent(Label).string = this.hero.dep
oops.message.dispatchEvent("hero_card_update_info",{uuid:this.h_uuid})
}
lv_selcet(e:any,val:any){
let active = this.node.getChildByName("menu").getChildByName("active")
@@ -151,7 +153,8 @@ export class HeroHomeComp extends CCComp {
smc.vmdata.items[1001] -= ((LvUp[0]+this.hero.lvexp)*this.role.lv)
smc.vmdata.gold -= (UpGold.LvUp*this.role.lv)
this.role.lv++
this.update_data()
this.update_data()
}
slv_up(){
if(this.role.slv>=5){