Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.61 KB | None | 0 0
  1. TextureAtlas atlas = new TextureAtlas("assets/roborally/tilesAtlas.txt");
  2.  
  3.  
  4.         assert gameBoard != null;
  5.         //create board from board obj
  6.         TiledMapTileLayer layer = (TiledMapTileLayer) board.getLayers().get(0);
  7.         for (int x = 0; x < gameBoard.getWidth(); x++) {
  8.             for (int y = 0; y < gameBoard.getHeight();y++) {
  9.                 TiledMapTileLayer.Cell cell = new TiledMapTileLayer.Cell();
  10.                 Sprite conn = atlas.createSprite("conn");
  11.                 cell.setTile(new StaticTiledMapTile(conn));
  12.                 layer.setCell(x, y, cell);
  13.             }
  14.  
  15.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement