排序问题解决,优化小兵线路
This commit is contained in:
@@ -53,6 +53,11 @@ export class BoxRangComp extends CCComp {
|
||||
}
|
||||
}
|
||||
onPreSolve (selfCollider: Collider2D, otherCollider: Collider2D, contact: IPhysics2DContact | null) {
|
||||
// if(selfCollider.node.parent.position.y < otherCollider.node.parent.position.y){
|
||||
// console.log("onPreSolve f:"+selfCollider.node.parent.getSiblingIndex()+"/"+otherCollider.node.parent.getSiblingIndex());
|
||||
// selfCollider.node.parent.setSiblingIndex(otherCollider.node.parent.getSiblingIndex()+1)
|
||||
// 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() ;
|
||||
|
||||
Reference in New Issue
Block a user