- for(int width = 0; width < mapWidth; width += 32)
- if(width > camera.position.x - 380 && width < camera.position.x + camera.viewportWidth)
- for(int height = 0; height < mapHeight; height += 32)
- if(height > camera.position.y - 250 && height < camera.position.y + camera.viewportHeight)
- batch.draw(bgLayer.getCell((int) (width / bgLayer.getTileWidth()), (int) (height / bgLayer.getTileHeight())).getTile().getTextureRegion(), width, height, 32, 32);
a guest Feb 2nd, 2014 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
RAW Paste Data