排序问题解决,优化小兵线路
This commit is contained in:
@@ -41,9 +41,10 @@ export class BoxRangComp extends CCComp {
|
||||
// this.HeroViewComp.stop_cd = 0.1
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
onEndContact (selfCollider: Collider2D, otherCollider: Collider2D, contact: IPhysics2DContact | null) {
|
||||
|
||||
|
||||
if(selfCollider.group != otherCollider.group&&otherCollider.tag == 0 ){
|
||||
// console.log(this.node.name+"onEndContact: seft:"+selfCollider.group+"|other:"+otherCollider.group+"| tag: seft:"+selfCollider.tag+"|other:"+otherCollider.tag);
|
||||
this.HeroViewComp.is_atking = false;
|
||||
@@ -53,6 +54,7 @@ export class BoxRangComp extends CCComp {
|
||||
}
|
||||
}
|
||||
onPreSolve (selfCollider: Collider2D, otherCollider: Collider2D, contact: IPhysics2DContact | null) {
|
||||
|
||||
if(selfCollider.group != otherCollider.group&&otherCollider.tag == 0){
|
||||
let scene =smc.map.MapView.scene.mapLayer!.node!
|
||||
let other_pos = otherCollider.node.getWorldPosition() ;
|
||||
|
||||
Reference in New Issue
Block a user