需要修复 英雄目标错误
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user