环境技能继续
This commit is contained in:
@@ -31,21 +31,17 @@ export class HeroHomeComp extends CCComp {
|
||||
loads(){
|
||||
let heros:any=HeroList
|
||||
let hc:number =HeroList.length
|
||||
console.log("hero_home heros:",heros,hc)
|
||||
let parent= this.node.getChildByName("heros").getChildByName("view").getChildByName("content")
|
||||
parent.getComponent(UITransform).width=hc*150
|
||||
console.log("parent:",parent)
|
||||
for (let i = 0; i < hc; i++) {
|
||||
let hcc =ecs.getEntity<HeroCard>(HeroCard)
|
||||
hcc.load(HeroList[i],parent)
|
||||
}
|
||||
}
|
||||
hero_show(uuid:number) {
|
||||
console.log("hero_home hero_show:",uuid)
|
||||
this.h_uuid=uuid
|
||||
this.role=smc.heros[uuid]
|
||||
this.hero=HeroInfo[uuid]
|
||||
console.log("hero_home hero:",this.hero)
|
||||
let tal=this.node.getChildByName("sk").getChildByName("tal");
|
||||
let sk_node= this.node.getChildByName("sk");
|
||||
let skill = SkillSet[this.hero.sk2[0]]
|
||||
@@ -160,7 +156,6 @@ export class HeroHomeComp extends CCComp {
|
||||
|
||||
|
||||
lv_up(){
|
||||
console.log("升级",smc.vmdata.items[1001],((LvUp[0]+this.hero.lvexp)*this.role.lv))
|
||||
if(smc.vmdata.items[1001] < ((LvUp[0]+this.hero.lvexp)*this.role.lv)||smc.vmdata.gold < (UpGold.LvUp*this.role.lv)){
|
||||
oops.gui.toast("资源不足,升级失败");
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user