This commit is contained in:
2024-08-23 13:26:26 +08:00
parent 75f0677b88
commit 97875dfe2b
10 changed files with 286 additions and 43 deletions

View File

@@ -123,11 +123,9 @@ export class MonsterViewComp extends CCComp {
}
onPreSolve (selfCollider: Collider2D, otherCollider: Collider2D, contact: IPhysics2DContact | null) {
if(selfCollider.group != otherCollider.group&&otherCollider.tag != BoxSet.ATK_RANGE){
if(selfCollider.group != otherCollider.group&&otherCollider.tag != BoxSet.ATK_RANGE&&otherCollider.tag != BoxSet.SKILL_TAG){
this.is_atking = true;
if(otherCollider.tag != BoxSet.SKILL_TAG&&selfCollider.tag != BoxSet.ATK_RANGE){
this.stop_cd = 0.1;
}
this.stop_cd = 0.1;
}
}
@@ -213,8 +211,8 @@ export class MonsterViewComp extends CCComp {
shoot(skill_uuid:number){
// console.log("monster shoot");
let skill = ecs.getEntity<Skill>(Skill);
let x=0
let pos = v3(x,40)
let x=32
let pos = v3(this.scale*32,30)
let speed =SkillSet[skill_uuid].speed;
let scale = this.scale
let dis = SkillSet[skill_uuid].dis;