去掉局内buff
This commit is contained in:
@@ -150,104 +150,12 @@ export class MissionHomeComp extends CCComp {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
show_heros(){
|
||||
this.node.getChildByName("heros").setPosition(0,290)
|
||||
}
|
||||
hide_heros(){
|
||||
this.node.getChildByName("heros").setPosition(0,-800)
|
||||
}
|
||||
show_buff_set(){
|
||||
this.node.getChildByName("buffset").setPosition(0,400)
|
||||
}
|
||||
hide_buff_set(){
|
||||
this.node.getChildByName("buffset").setPosition(0,-800)
|
||||
}
|
||||
add_ap(){
|
||||
if(smc.vmdata.buff_num_less < MBSet.ap_cost){
|
||||
oops.gui.toast("成长点数不足")
|
||||
return
|
||||
}
|
||||
smc.vmdata.buff_num_less -= MBSet.ap_cost
|
||||
smc.vmdata.buff_num[0] += MBSet.ap_cost
|
||||
smc.vmdata.mission.ap_up=MBSet.ap_add*smc.vmdata.buff_num[0]/MBSet.ap_cost
|
||||
}
|
||||
less_ap(){
|
||||
if(smc.vmdata.buff_num[0] <= 0){
|
||||
return
|
||||
}
|
||||
smc.vmdata.buff_num_less += MBSet.ap_cost
|
||||
smc.vmdata.buff_num[0] -= MBSet.ap_cost
|
||||
smc.vmdata.mission.ap_up=MBSet.ap_add*smc.vmdata.buff_num[0]/MBSet.ap_cost
|
||||
}
|
||||
add_def(){
|
||||
if(smc.vmdata.buff_num_less < MBSet.def_cost){
|
||||
oops.gui.toast("成长点数不足")
|
||||
return
|
||||
}
|
||||
smc.vmdata.buff_num_less -= MBSet.def_cost
|
||||
smc.vmdata.buff_num[1] += MBSet.def_cost
|
||||
smc.vmdata.mission.def_up=MBSet.def_add*smc.vmdata.buff_num[1]/MBSet.def_cost
|
||||
}
|
||||
less_def(){
|
||||
if(smc.vmdata.buff_num[1] <= 0){
|
||||
return
|
||||
}
|
||||
smc.vmdata.buff_num_less += MBSet.def_cost
|
||||
smc.vmdata.buff_num[1] -= MBSet.def_cost
|
||||
smc.vmdata.mission.def_up=MBSet.def_add*smc.vmdata.buff_num[1]/MBSet.def_cost
|
||||
}
|
||||
add_hp(){
|
||||
if(smc.vmdata.buff_num_less < MBSet.hp_cost){
|
||||
oops.gui.toast("成长点数不足")
|
||||
return
|
||||
}
|
||||
smc.vmdata.buff_num_less -= MBSet.hp_cost
|
||||
smc.vmdata.buff_num[2] += MBSet.hp_cost
|
||||
smc.vmdata.mission.hp_up=MBSet.hp_add*smc.vmdata.buff_num[2]/MBSet.hp_cost
|
||||
}
|
||||
less_hp(){
|
||||
if(smc.vmdata.buff_num[2] <= 0){
|
||||
return
|
||||
}
|
||||
smc.vmdata.buff_num_less += MBSet.hp_cost
|
||||
smc.vmdata.buff_num[2] -= MBSet.hp_cost
|
||||
smc.vmdata.mission.hp_up=MBSet.hp_add*smc.vmdata.buff_num[2]/MBSet.hp_cost
|
||||
}
|
||||
add_crit(){
|
||||
if(smc.vmdata.buff_num_less < MBSet.crit_cost){
|
||||
oops.gui.toast("成长点数不足")
|
||||
return
|
||||
}
|
||||
smc.vmdata.buff_num_less -= MBSet.crit_cost
|
||||
smc.vmdata.buff_num[3] += MBSet.crit_cost
|
||||
smc.vmdata.mission.crit_up=MBSet.crit_add*smc.vmdata.buff_num[3]/MBSet.crit_cost
|
||||
}
|
||||
less_crit(){
|
||||
if(smc.vmdata.buff_num[3] <= 0){
|
||||
return
|
||||
}
|
||||
smc.vmdata.buff_num_less += MBSet.crit_cost
|
||||
smc.vmdata.buff_num[3] -= MBSet.crit_cost
|
||||
smc.vmdata.mission.crit_up=MBSet.crit_add*smc.vmdata.buff_num[3]/MBSet.crit_cost
|
||||
}
|
||||
add_dodge(){
|
||||
if(smc.vmdata.buff_num_less < MBSet.dodge_cost){
|
||||
oops.gui.toast("成长点数不足")
|
||||
return
|
||||
}
|
||||
smc.vmdata.buff_num_less -= MBSet.dodge_cost
|
||||
smc.vmdata.buff_num[4] += MBSet.dodge_cost
|
||||
smc.vmdata.mission.dodge_up=MBSet.dodge_add*smc.vmdata.buff_num[4]/MBSet.dodge_cost
|
||||
}
|
||||
less_dodge(){
|
||||
if(smc.vmdata.buff_num[4] <= 0){
|
||||
return
|
||||
}
|
||||
smc.vmdata.buff_num_less += MBSet.dodge_cost
|
||||
smc.vmdata.buff_num[4] -= MBSet.dodge_cost
|
||||
smc.vmdata.mission.dodge_up=MBSet.dodge_add*smc.vmdata.buff_num[4]/MBSet.dodge_cost
|
||||
}
|
||||
|
||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||
reset() {
|
||||
|
||||
Reference in New Issue
Block a user