|
@@ -266,7 +266,7 @@ export default class FMap extends cc.Component {
|
|
|
}
|
|
|
}
|
|
|
}else{
|
|
|
- let targetX = targetPos.x - this.midWidth;
|
|
|
+ let targetX = room.x - this.midWidth;
|
|
|
if(targetX < room.x){
|
|
|
targetX = room.x
|
|
|
}
|
|
@@ -315,7 +315,7 @@ export default class FMap extends cc.Component {
|
|
|
}
|
|
|
}
|
|
|
}else{
|
|
|
- let targetY = targetPos.y - this.midHeidht;
|
|
|
+ let targetY = room.y - this.midHeidht;
|
|
|
if(targetY < room.y){
|
|
|
targetY = room.y
|
|
|
}
|