Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function mapView(x, y) {
- if ((playerX == 0 && playerY == 0) || (x == 0 && y == 0)) return;
- mapConatiner.scrollLeft = mapZoom * (y / mapSize) - (document.body.clientWidth / 2) + 500;
- mapConatiner.scrollTop = mapZoom * (x / mapSize) - (document.body.clientHeight / 2) + 500;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement