排序问题解决,优化小兵线路

This commit is contained in:
2024-09-13 00:51:23 +08:00
parent f80115e251
commit 221d91a795
43 changed files with 11085 additions and 28930 deletions

View File

@@ -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() ;