This commit is contained in:
2024-09-19 08:39:56 +08:00
parent 01ad8b619e
commit 684ef1619d
10 changed files with 791 additions and 691 deletions

View File

@@ -197,7 +197,7 @@ export class HeroViewComp extends CCComp {
if(this.stop_cd > 0){
return
}
if (this.node.position.x >= 250-this.atk_dis) {
if (this.node.position.x >= 250-this.atk_dis/2) {
return;
}
// if(this.enemy){
@@ -244,16 +244,14 @@ export class HeroViewComp extends CCComp {
let pos =this.skill_pos()
let t_pos:Vec3 = v3(720,0)
if(this.enemy){
t_pos = v3(this.enemy.x-this.node.position.x,this.enemy.y-(this.node.position.y+pos.y))
t_pos = v3(this.enemy.x-this.node.position.x,this.enemy.y-this.node.position.y)
}
console.log("get_hero_pos",this.enemy,this.node.position,t_pos);
return {pos,t_pos}
}
get_hero_pos(hero:any){
let pos =this.skill_pos()
let t_pos:Vec3 = v3(720,0)
if(!hero.HeroView.node.isValid){
console.log("hero.heroView.node.isValid",hero.HeroView);
return
}else{
t_pos = v3(hero.HeroView.node.position.x-this.node.position.x,hero.HeroView.node.position.y-(this.node.position.y+pos.y))
@@ -443,7 +441,7 @@ export class HeroViewComp extends CCComp {
this.scheduleOnce(() => {
this.sprite.setSharedMaterial(this.orginalFlashMaterial, 0);
}, 0.3);
console.log(this.buff_atks)
// console.log(this.buff_atks)
}
check_buff_atks(dt: number){