物品 和 金币等资源分开
This commit is contained in:
@@ -156,11 +156,11 @@ export class HeroHomeComp extends CCComp {
|
||||
|
||||
|
||||
lv_up(){
|
||||
if(smc.vmdata.items[1001].num < ((LvUp[0]+this.hero.lvexp)*this.role.lv)){
|
||||
if(smc.vmdata.exp.num < ((LvUp[0]+this.hero.lvexp)*this.role.lv)){
|
||||
oops.gui.toast("资源不足,升级失败");
|
||||
return
|
||||
}
|
||||
smc.vmdata.items[1001].num -= ((LvUp[0]+this.hero.lvexp)*this.role.lv)
|
||||
smc.vmdata.exp.num -= ((LvUp[0]+this.hero.lvexp)*this.role.lv)
|
||||
this.role.lv++
|
||||
this.update_data()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user