Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TextureAtlas atlas = new TextureAtlas("assets/roborally/tilesAtlas.txt");
- assert gameBoard != null;
- //create board from board obj
- TiledMapTileLayer layer = (TiledMapTileLayer) board.getLayers().get(0);
- for (int x = 0; x < gameBoard.getWidth(); x++) {
- for (int y = 0; y < gameBoard.getHeight();y++) {
- TiledMapTileLayer.Cell cell = new TiledMapTileLayer.Cell();
- Sprite conn = atlas.createSprite("conn");
- cell.setTile(new StaticTiledMapTile(conn));
- layer.setCell(x, y, cell);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement