添加role 删除多余地图文件

This commit is contained in:
2024-08-23 10:35:15 +08:00
parent a97f6bfa80
commit e0431b6fad
55 changed files with 2323 additions and 3343 deletions

View File

@@ -76,7 +76,7 @@ export class MonsterViewComp extends CCComp {
onLoad() {
this.as = this.getComponent(MonsterSpine);
// PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb
PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb
// | EPhysics2DDrawFlags.Pair
// |EPhysics2DDrawFlags.CenterOfMass
// |EPhysics2DDrawFlags.Joint
@@ -106,10 +106,6 @@ export class MonsterViewComp extends CCComp {
}
onBeginContact (selfCollider: Collider2D, otherCollider: Collider2D, contact: IPhysics2DContact | null) {
}
onEndContact (selfCollider: Collider2D, otherCollider: Collider2D, contact: IPhysics2DContact | null) {
if(otherCollider.tag==BoxSet.SKILL_TAG &&selfCollider.tag!=BoxSet.SKILL_TAG){
if(selfCollider.group != otherCollider.group){
let skill = otherCollider.node.getComponent(SkillCom)!;
@@ -121,6 +117,10 @@ export class MonsterViewComp extends CCComp {
this.hp_change(skill.atk);
}
}
}
onEndContact (selfCollider: Collider2D, otherCollider: Collider2D, contact: IPhysics2DContact | null) {
}
onPreSolve (selfCollider: Collider2D, otherCollider: Collider2D, contact: IPhysics2DContact | null) {
if(selfCollider.group != otherCollider.group&&otherCollider.tag != BoxSet.ATK_RANGE){
@@ -220,7 +220,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,0);
skill.load(pos,speed,dis,scale,this.node,sp_name,atk);
}
in_act(dt: number) {