dd
This commit is contained in:
@@ -49,13 +49,13 @@ export class BoxRangComp extends CCComp {
|
||||
}
|
||||
onPreSolve (selfCollider: Collider2D, otherCollider: Collider2D, contact: IPhysics2DContact | null) {
|
||||
if(selfCollider.group != otherCollider.group&&otherCollider.tag == 0){
|
||||
this.MonsterViewComp.is_atking = true;
|
||||
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);
|
||||
if(Math.abs(other_pos.x-self_pos.x) < BoxSet.ATK_RANGE_X){
|
||||
this.MonsterViewComp.stop_cd = 0.1
|
||||
this.MonsterViewComp.is_atking = true;
|
||||
// this.MonsterViewComp.stop_cd = 0.1
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user