This commit is contained in:
2024-08-22 15:47:37 +08:00
parent bdb96e61a1
commit 1be37ab104
11 changed files with 453 additions and 112 deletions

View File

@@ -32,6 +32,7 @@ export class SkillCom extends CCComp {
let collider = this.getComponent(Collider2D);
collider.group = this.box_group;
// console.log("skill group",this.box_group)
collider.tag = this.box_tag;
collider.sensor = true;
if (collider) {
@@ -62,7 +63,7 @@ export class SkillCom extends CCComp {
}
onEndContact (selfCollider: Collider2D, otherCollider: Collider2D, contact: IPhysics2DContact | null) {
if(otherCollider.group != selfCollider.group){
console.log("skill end contact")
// console.log("skill end contact",selfCollider.group,otherCollider.group)
setTimeout(() => {
this.toDestroy()
}, 10);