技能的销毁 还存在问题

This commit is contained in:
2024-08-22 17:20:13 +08:00
parent 1be37ab104
commit 6e9faca1a3
9 changed files with 177 additions and 44 deletions

View File

@@ -110,6 +110,9 @@ export class MonsterViewComp extends CCComp {
let skill = otherCollider.node.getComponent(SkillCom)!;
// console.log('onPostSolve',skill);
this.in_atked();
if(this.hp <= 0 ){
return
}
this.hp_change(skill.atk);
}
}
@@ -219,7 +222,7 @@ export class MonsterViewComp extends CCComp {
let dis = SkillSet[skill_uuid].dis;
let atk = SkillSet[skill_uuid].atk+this.atk;
let sp_name = SkillSet[skill_uuid].sp_name;
skill.load(pos,speed,dis,scale,this.node,sp_name,atk);
skill.load(pos,speed,dis,scale,this.node,sp_name,0);
}
in_act(dt: number) {