daily pastebin goal
67%
SHARE
TWEET

Untitled

a guest Feb 2nd, 2014 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for(int width = 0; width < mapWidth; width += 32)
  2. {
  3.         if(width > camera.position.x - 380 && width < camera.position.x + camera.viewportWidth)
  4.         {
  5.                 for(int height = 0; height < mapHeight; height += 32)
  6.                 {
  7.                         if(height > camera.position.y - 250 && height < camera.position.y + camera.viewportHeight)
  8.                         {
  9.                                 batch.draw(bgLayer.getCell((int) (width / bgLayer.getTileWidth()), (int) (height / bgLayer.getTileHeight())).getTile().getTextureRegion(), width, height, 32, 32);
  10.                         }
  11.                 }
  12.         }
  13. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top