dd
This commit is contained in:
@@ -277,7 +277,6 @@ export class HeroViewComp extends CCComp {
|
||||
get_hero_pos(hero:any){
|
||||
let pos =this.skill_pos()
|
||||
let t_pos:Vec3 = v3(720,0)
|
||||
console.log("hero.node.isValid",hero);
|
||||
if(!hero.node.isValid){
|
||||
return
|
||||
}else{
|
||||
@@ -347,10 +346,12 @@ export class HeroViewComp extends CCComp {
|
||||
|
||||
}
|
||||
if(t_hero){ //血量最少单体
|
||||
let role_hp=smc.Role.RoleView.hp_max-smc.Role.RoleView.hp
|
||||
if(role_hp > least_hp){
|
||||
least_hp = role_hp
|
||||
t_hero = smc.Role.RoleView
|
||||
if(smc.Role.RoleView){
|
||||
let role_hp=smc.Role.RoleView.hp_max-smc.Role.RoleView.hp
|
||||
if(role_hp > least_hp){
|
||||
least_hp = role_hp
|
||||
t_hero = smc.Role.RoleView
|
||||
}
|
||||
}
|
||||
this.to_add_buff(t_hero,skill)
|
||||
}
|
||||
@@ -451,7 +452,7 @@ export class HeroViewComp extends CCComp {
|
||||
return;
|
||||
}
|
||||
this.hp += lhp;
|
||||
this.tooltip(1,hp.toString());
|
||||
// this.tooltip(1,hp.toString());
|
||||
if(this.hp > this.hp_max){
|
||||
this.hp = this.hp_max;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user