hp buff 基本完成
This commit is contained in:
@@ -60,6 +60,7 @@ export class BuffComp extends Component {
|
||||
this.vmdata_update()
|
||||
}
|
||||
to_update_vmdata(){
|
||||
|
||||
this.vmdata_update(false)
|
||||
}
|
||||
update(deltaTime: number) {
|
||||
@@ -91,7 +92,9 @@ export class BuffComp extends Component {
|
||||
}
|
||||
|
||||
vmdata_update(is_hp:boolean=false){
|
||||
console.log("[BuffComp]:vmdata_update",is_hp)
|
||||
if(this.HeroView.is_kalami) return
|
||||
console.log("[BuffComp]:to_update_vmdata:"+this.HeroView.hero_name)
|
||||
|
||||
let buff=null
|
||||
let info= null
|
||||
if(!this.HeroView) return
|
||||
@@ -104,12 +107,12 @@ export class BuffComp extends Component {
|
||||
let view_deatk = 0 //临时debuff
|
||||
if(is_hp){
|
||||
info.hp=this.HeroView.hp
|
||||
info.hp_max=this.HeroView.hp_max*(100+buff.HP)/100
|
||||
info.hp_buff=buff.HP
|
||||
info.hp_max=this.HeroView.hp_max*(100+buff.HP)/100
|
||||
}else{
|
||||
info.hp=this.HeroView.hp
|
||||
info.hp_max=this.HeroView.hp_max*(100+buff.HP)/100
|
||||
info.hp_buff=buff.HP
|
||||
info.hp_max=this.HeroView.hp_max*(100+buff.HP)/100
|
||||
for(let i=0;i<this.HeroView.BUFF_ATKS.length;i++){
|
||||
view_atk += this.HeroView.BUFF_ATKS[i].value
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user