解决修改后的bug
This commit is contained in:
@@ -223,11 +223,11 @@ export class HeroViewComp extends CCComp {
|
||||
// this.BUFFCOMP.tooltip(TooltipTypes.speedup,speed.toFixed(0));
|
||||
}
|
||||
add_ap(ap: number,is_num:boolean=true){
|
||||
//console.log("[HeroViewComp]:add_ap add:",ap,this.ap)
|
||||
console.log("[HeroViewComp]:add_ap add:",ap,this.ap)
|
||||
if(is_num){
|
||||
this.ap_base += Math.floor(ap);
|
||||
}else{
|
||||
this.buff_ap += Math.floor(ap/100*this.ap);
|
||||
this.buff_ap += Math.floor(ap);
|
||||
}
|
||||
let diff=Math.floor(this.ap_base*(100+this.buff_ap)/100)-this.ap
|
||||
this.ap = Math.floor(this.ap_base*(100+this.buff_ap)/100)
|
||||
@@ -256,6 +256,7 @@ export class HeroViewComp extends CCComp {
|
||||
}
|
||||
|
||||
add_hp_max(hp: number=0,is_num:boolean=false){
|
||||
console.log("[HeroViewComp]:add_hp_max add:",hp,this.hp_max)
|
||||
if(is_num){
|
||||
this.hp_base += Math.floor(hp) ;
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user