SHARE
TWEET

Untitled

a guest Nov 4th, 2016 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         world.step(Gdx.graphics.getDeltaTime(), 6, 2);
  2.    
  3.         camera.position.x = positionMap.get(EntityManager.getPlayer()).x;
  4.         camera.position.y = positionMap.get(EntityManager.getPlayer()).y;
  5.        
  6.         // v v v ------------------------------- Renders the tiled map ---------------------------- v v v
  7.         renderer.setView(camera);
  8.         renderer.getBatch().begin();
  9.         renderer.renderTileLayer((TiledMapTileLayer) renderer.getMap().getLayers().get(0));
  10.         renderer.renderTileLayer((TiledMapTileLayer) renderer.getMap().getLayers().get(1));
  11.         renderer.getBatch().end();
  12.         // ^ ^ ^ ---------------------------------------------------------------------------------- ^ ^ ^
  13.  
  14.         // v v v -------- Updates the position of the players light source and updates the rest of the Box2D lights ------- v v v
  15.         playerLight.setPosition(positionMap.get(EntityManager.getPlayer()).x
  16.                 + spriteMap.get(EntityManager.getPlayer()).width / 2f,
  17.                 positionMap.get(EntityManager.getPlayer()).y);
  18.         rayHandler.update();
  19.         rayHandler.setCombinedMatrix(camera);
  20.         rayHandler.render();
  21.         // ^ ^ ^ ----------------------------------------------------------------------------------------------------------- ^ ^ ^
  22.        
  23.         camera.update();
  24.  
  25.         zSort.sort(); // Sorts the array of entities and map sprites from greatest to smallest y value
  26.         renderZSort(delta); // renders all items in the now sorted array of entities and map sprites
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top