dd
This commit is contained in:
@@ -277,6 +277,7 @@ 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{
|
||||
@@ -315,7 +316,7 @@ export class HeroViewComp extends CCComp {
|
||||
hero.add_shield(increase_shield,smc.skills[s_uuid].bsd*this.st_boncus)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
push_least_buff(skill:number){
|
||||
let heros:any = ecs.query(ecs.allOf(HeroModelComp));
|
||||
let least_hp:number=0
|
||||
@@ -363,20 +364,20 @@ export class HeroViewComp extends CCComp {
|
||||
handle_skill(skill:number){
|
||||
switch (smc.skills[skill].tg) {
|
||||
case 0: //自己
|
||||
this.to_add_buff(this.ent,skill)
|
||||
this.to_add_buff(this.node.getComponent(HeroViewComp),skill)
|
||||
break;
|
||||
case 1: //伙伴
|
||||
this.push_least_buff(skill)
|
||||
break;
|
||||
case 2: //自己和伙伴
|
||||
this.to_add_buff(this.ent,skill)
|
||||
this.to_add_buff(this.node.getComponent(HeroViewComp),skill)
|
||||
this.push_least_buff(skill)
|
||||
break;
|
||||
case 3: //敌人
|
||||
this.shoot_enemy(skill)
|
||||
break;
|
||||
case 4: //敌人和自己
|
||||
this.to_add_buff(this.ent,skill)
|
||||
this.to_add_buff(this.node.getComponent(HeroViewComp),skill)
|
||||
this.shoot_enemy(skill)
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user