SHARE
TWEET
Untitled
a guest
Nov 4th, 2016
61
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- world.step(Gdx.graphics.getDeltaTime(), 6, 2);
- camera.position.x = positionMap.get(EntityManager.getPlayer()).x;
- camera.position.y = positionMap.get(EntityManager.getPlayer()).y;
- // v v v ------------------------------- Renders the tiled map ---------------------------- v v v
- renderer.setView(camera);
- renderer.getBatch().begin();
- renderer.renderTileLayer((TiledMapTileLayer) renderer.getMap().getLayers().get(0));
- renderer.renderTileLayer((TiledMapTileLayer) renderer.getMap().getLayers().get(1));
- renderer.getBatch().end();
- // ^ ^ ^ ---------------------------------------------------------------------------------- ^ ^ ^
- // v v v -------- Updates the position of the players light source and updates the rest of the Box2D lights ------- v v v
- playerLight.setPosition(positionMap.get(EntityManager.getPlayer()).x
- + spriteMap.get(EntityManager.getPlayer()).width / 2f,
- positionMap.get(EntityManager.getPlayer()).y);
- rayHandler.update();
- rayHandler.setCombinedMatrix(camera);
- rayHandler.render();
- // ^ ^ ^ ----------------------------------------------------------------------------------------------------------- ^ ^ ^
- camera.update();
- zSort.sort(); // Sorts the array of entities and map sprites from greatest to smallest y value
- 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.

