I am making a tiled based game, I want not to let the camera show places, where there is no map... this is a obvious solution I got from a tutorial
if(camera.position.x<400){
camera.position.x=400;
}else if(camera.position.x>map.width*map.tileWidth-400){
camera.position.x=map.width*map.tileWidth-400;
}
if(camera.position.y<240){
camera.position.y=240;
}else if(camera.position.y>map.height*map.tileHeight-240){
camera.position.y=map.height*map.tileHeight-240;
}
camera.update();
but I don't know how to get width & height of the tiledMap in the latest version of libgdx
https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/maps/tiled/TiledMap.java
Seems strange... I even tried the Super classes but couldn't find. Please help.