diff --git a/assets/script/Main.ts b/assets/script/Main.ts index bb5c2a5b..efc4640f 100644 --- a/assets/script/Main.ts +++ b/assets/script/Main.ts @@ -12,9 +12,9 @@ const { ccclass, property } = _decorator; @ccclass('Main') export class Main extends Root { start() { - // PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb + PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb // |EPhysics2DDrawFlags.Pair - // |EPhysics2DDrawFlags.CenterOfMass + |EPhysics2DDrawFlags.CenterOfMass // |EPhysics2DDrawFlags.Joint // |EPhysics2DDrawFlags.Shape; } diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index 75045bfd..c9afc700 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -53,7 +53,11 @@ export class HeroViewComp extends CCComp { this.on(GameEvent.FightEnd,this.do_fight_end,this) const collider = this.node.getComponent(BoxCollider2D); this.scheduleOnce(()=>{ - if (collider) collider.enabled = true; // 先禁 + if (collider) { + collider.enabled = true; // 先禁 + collider.group = this.box_group; // 设置为英雄组 + } + },0.1) // let anm = this.node.getChildByName("anm") // anm.setScale(anm.scale.x*0.8,anm.scale.y*0.8);