Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement