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