android - Find corner cell of TileMap? -
problem when detecting corner cell of tile map???
private void gettiles(int startx, int starty, int endx, int endy, array<rectangle> tiles) { tiledmaptilelayer layer=(tiledmaptilelayer)worldrenderer.map.getlayers().getlayer(0); tiledmaptilelayer layer1 = (tiledmaptilelayer)worldrenderer.map.getlayers().getlayer(1); layer_height=layer1.getheight(); layer_width=layer1.getwidth(); leftcornercell=layer1.getcell(0, 0);
it calculate screen x/y while want give map x/y.
and gives result nullpointer exception.... meeans not finding cell @ perticuler position.
how find out corner cell of tilemap in libgdx???
Comments
Post a Comment