This commit is contained in:
2024-08-07 08:44:40 +08:00
parent 66f32a44ae
commit 50c79b83e0
79 changed files with 1844 additions and 5140 deletions

View File

@@ -52,13 +52,12 @@ export class MonsterViewComp extends CCComp {
}
}
onBeginContact (selfCollider: Collider2D, otherCollider: Collider2D, contact: IPhysics2DContact | null) {
switch (selfCollider.tag) {
case BoxSet.MONSTER:
switch (otherCollider.tag){
case BoxSet.HERO:
this.state = 2;
// console.log("im monster other is hero");
console.log('onBeginContact',selfCollider,otherCollider);
// this.speed = 0;
// this.timer = 1;
// console.log("speed:"+this.speed+" | timer:"+this.timer);
@@ -77,7 +76,7 @@ export class MonsterViewComp extends CCComp {
break;
case BoxSet.HERO_SKILL:
break;
break;
}
}