boss 位置调整
This commit is contained in:
@@ -137,15 +137,15 @@ export class MonViewComp extends CCComp {
|
||||
}
|
||||
onEndContact (selfCollider: Collider2D, otherCollider: Collider2D) { }
|
||||
onPreSolve (selfCollider: Collider2D, otherCollider: Collider2D) {
|
||||
// if(selfCollider.group == otherCollider.group&&selfCollider.tag==otherCollider.tag){
|
||||
// if(selfCollider.node.position.y < otherCollider.node.position.y){
|
||||
// if(selfCollider.node.getSiblingIndex() < otherCollider.node.getSiblingIndex()){
|
||||
// selfCollider.node.setSiblingIndex(otherCollider.node.getSiblingIndex()+1)
|
||||
// // console.log("onPreSolve b:"+selfCollider.node.uuid+":"+selfCollider.node.getSiblingIndex()+"/"+otherCollider.node.uuid+":"+otherCollider.node.getSiblingIndex());
|
||||
// }
|
||||
if(selfCollider.group == otherCollider.group&&selfCollider.tag==otherCollider.tag){
|
||||
if(selfCollider.node.position.y < otherCollider.node.position.y){
|
||||
if(selfCollider.node.getSiblingIndex() < otherCollider.node.getSiblingIndex()){
|
||||
selfCollider.node.setSiblingIndex(otherCollider.node.getSiblingIndex()+1)
|
||||
// console.log("onPreSolve b:"+selfCollider.node.uuid+":"+selfCollider.node.getSiblingIndex()+"/"+otherCollider.node.uuid+":"+otherCollider.node.getSiblingIndex());
|
||||
}
|
||||
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
if(selfCollider.group != otherCollider.group&&otherCollider.tag == 0){
|
||||
this.stop_cd = 0.1;
|
||||
this.is_atking=true
|
||||
|
||||
Reference in New Issue
Block a user