技能动画添加

This commit is contained in:
2025-01-05 09:10:21 +08:00
parent 66f4a0de82
commit 511459c66c
118 changed files with 22272 additions and 8796 deletions

View File

@@ -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()
}