假期修改
This commit is contained in:
@@ -26,10 +26,10 @@ export class BoxRangComp extends CCComp {
|
||||
this.MonViewComp=this.Hero_node.getComponent(MonViewComp);
|
||||
// console.log("range box",this.MonViewComp);
|
||||
if (collider) {
|
||||
collider.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this);
|
||||
// collider.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this);
|
||||
collider.on(Contact2DType.END_CONTACT, this.onEndContact, this);
|
||||
collider.on(Contact2DType.PRE_SOLVE, this.onPreSolve, this);
|
||||
collider.on(Contact2DType.POST_SOLVE, this.onPostSolve, this);
|
||||
// collider.on(Contact2DType.POST_SOLVE, this.onPostSolve, this);
|
||||
}
|
||||
}
|
||||
onBeginContact (selfCollider: Collider2D, otherCollider: Collider2D, contact: IPhysics2DContact | null) {
|
||||
@@ -59,7 +59,6 @@ export class BoxRangComp extends CCComp {
|
||||
// console.log("onPreSolve b:"+selfCollider.node.parent.getSiblingIndex()+"/"+otherCollider.node.parent.getSiblingIndex());
|
||||
// }
|
||||
if(selfCollider.group != otherCollider.group&&otherCollider.tag == 0){
|
||||
let scene =smc.map.MapView.scene.mapLayer!.node!
|
||||
let other_pos = otherCollider.node.getWorldPosition() ;
|
||||
let self_pos = this.node.getWorldPosition();
|
||||
// console.log("onPreSolve:",self_pos,other_pos);
|
||||
|
||||
Reference in New Issue
Block a user