技能动画添加
This commit is contained in:
@@ -128,7 +128,7 @@ export class HeroHomeComp extends CCComp {
|
||||
lvup.getChildByName("info").getChildByName("hp").getComponent(Label).string = "+"+this.hero.hp_up
|
||||
// lvup.getChildByName("item").getChildByName("btn").getChildByName("bar").getComponent(ProgressBar).progress = smc.vmdata.exp.num/((LvUp[0]+this.hero.lvexp)*this.role.lv)
|
||||
// slvup.getChildByName("gold").getChildByName("btn").getChildByName("need").getComponent(Label).string = (UpGold.SlvUp*(this.role.slv+1)).toString()
|
||||
let slvneed=HeroInfo[this.h_uuid].slvexp*this.role.slv
|
||||
let slvneed=HeroInfo[this.h_uuid].slvexp
|
||||
let slvnum=smc.heros[this.h_uuid].num
|
||||
slvup.getChildByName("up").active=slvnum>=slvneed
|
||||
if( slvnum>=slvneed) {
|
||||
@@ -246,15 +246,15 @@ export class HeroHomeComp extends CCComp {
|
||||
this.update_data()
|
||||
}
|
||||
slv_up(){
|
||||
if(this.role.slv>=5){
|
||||
oops.gui.toast("已经满星,升阶失败");
|
||||
return
|
||||
}
|
||||
if(smc.heros[this.h_uuid].num < (HeroInfo[this.h_uuid].slvexp*this.role.slv)){
|
||||
// if(this.role.slv>=5){
|
||||
// oops.gui.toast("已经满星,升阶失败");
|
||||
// return
|
||||
// }
|
||||
if(smc.heros[this.h_uuid].num < HeroInfo[this.h_uuid].slvexp){
|
||||
oops.gui.toast("资源不足,升阶失败");
|
||||
return
|
||||
}
|
||||
smc.heros[this.h_uuid].num -= (HeroInfo[this.h_uuid].slvexp*this.role.slv)
|
||||
smc.heros[this.h_uuid].num -= HeroInfo[this.h_uuid].slvexp
|
||||
this.role.slv++
|
||||
this.update_data()
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ export class MissionHomeComp extends CCComp {
|
||||
|
||||
let hc:number =HeroList.length
|
||||
let parent= this.node.getChildByName("heros").getChildByName("view").getChildByName("content")
|
||||
let height=Math.ceil(hc / 4)*140 +100
|
||||
let height=Math.ceil(hc / 4)*160 +100
|
||||
parent.getComponent(UITransform).height=height
|
||||
|
||||
for (let i = 0; i < hc; i++) {
|
||||
|
||||
Reference in New Issue
Block a user