英雄 简单优化
This commit is contained in:
@@ -88,45 +88,7 @@ export class BuffComp extends Component {
|
||||
this.node.getChildByName("shielded").active=val
|
||||
}
|
||||
|
||||
vmdata_update(is_hp:boolean=false){
|
||||
// console.log("[BuffComp]:to_update_vmdata:"+this.HeroView.hero_name)
|
||||
let info= null
|
||||
if(!this.HeroView) return
|
||||
if(!this.HeroView.is_master) return
|
||||
info=smc.vmdata.hero
|
||||
if(info==null) return
|
||||
let view_atk = 0 //临时buff
|
||||
let view_deatk = 0 //临时debuff
|
||||
if(is_hp){
|
||||
info.hp=this.HeroView.currentHp
|
||||
info.hp_max=this.HeroView.currentHpMax
|
||||
}else{
|
||||
info.hp=this.HeroView.currentHp
|
||||
info.hp_max=this.HeroView.currentHpMax
|
||||
|
||||
for(let i=0;i<this.HeroView.BUFF_ATKS.length;i++){
|
||||
view_atk += this.HeroView.BUFF_ATKS[i].value
|
||||
}
|
||||
|
||||
for(let i=0;i<this.HeroView.DEBUFF_DEATKS.length;i++){
|
||||
view_deatk += this.HeroView.DEBUFF_DEATKS[i].value
|
||||
}
|
||||
|
||||
info.ap=this.HeroView.ap
|
||||
// info.lv=this.HeroView.lv
|
||||
info.cd=Number(this.HeroView.cd.toFixed(2))
|
||||
|
||||
info.buff_ap=view_atk
|
||||
info.debuff_ap=view_deatk
|
||||
info.damage=this.HeroView.ap*(100+view_atk-view_deatk)/100
|
||||
info.crit=this.HeroView.crit
|
||||
info.crit_d=this.HeroView.crit_d
|
||||
info.dod=this.HeroView.dod
|
||||
info.def=this.HeroView.def
|
||||
info.wind=this.HeroView.wfuny
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
update_info_lv(){
|
||||
|
||||
Reference in New Issue
Block a user