需要修复 英雄目标错误

This commit is contained in:
2024-09-18 17:45:23 +08:00
parent 2ab7279b04
commit 01ad8b619e
17 changed files with 834 additions and 1723 deletions

View File

@@ -91,7 +91,7 @@ export class RoleViewComp extends CCComp {
is_dead:boolean = false; //是否摧毁
is_stop:boolean = false;
is_atking:boolean = false;
type:number = 0;
onLoad() {
// this.BoxRang = this.node.getChildByName("range_box");
this.as = this.node.getComponent(RoleSpine);
@@ -182,7 +182,8 @@ export class RoleViewComp extends CCComp {
this.check_buff_atks(dt)
this.in_shield(dt);
this.in_stop(dt);
this.in_atk(dt);
this.atk_time += dt;
this.in_atk();
// this.move();
this.check_enemys()
}
@@ -259,7 +260,7 @@ export class RoleViewComp extends CCComp {
return false
}
}
in_atk(dt: number) {
in_atk() {
if(this.atk_time >= this.atk_cd){
// if(this.is_atking&&this.check_enemy_alive()){
// this.atk_time = 0;
@@ -273,11 +274,10 @@ export class RoleViewComp extends CCComp {
this.as.atk();
this.scheduleOnce(()=>{
this.shoot(this.skill,-30);
},0.4)
}else{
this.atk_time += dt;
},0.2)
}
}
hp_change(hp: number){
if(this.is_dead){
return;