List of usage examples for com.badlogic.gdx.maps.tiled TiledMapTileSet size
public int size()
From source file:com.stercore.code.net.dermetfan.utils.libgdx.maps.MapUtils.java
License:Apache License
/** @see #readableHierarchy(com.badlogic.gdx.maps.Map, int) */ public static String readableHierarchy(TiledMapTileSet set, int indent) { String hierarchy = ""; for (int i = 0; i < indent; i++) hierarchy += '\t'; hierarchy += ClassReflection.getSimpleName(set.getClass()) + ' ' + set.getName() + " (" + set.size() + " tiles)\n"; hierarchy += readableHierarchy(set.getProperties(), indent + 1); for (TiledMapTile tile : set) hierarchy += readableHierarchy(tile, indent + 1); return hierarchy; }
From source file:com.stercore.code.net.dermetfan.utils.libgdx.maps.MapUtils.java
License:Apache License
/** creates an array of TiledMapTiles from a {@link TiledMapTileSet} * @param tiles the {@link TiledMapTileSet} to create an array from * @return the array of TiledMapTiles */ public static TiledMapTile[] toTiledMapTileArray(TiledMapTileSet tiles) { TiledMapTile[] tileArray = new TiledMapTile[tiles.size()]; Iterator<TiledMapTile> tileIterator = tiles.iterator(); for (int i = 0; tileIterator.hasNext(); i++) tileArray[i] = tileIterator.next(); return tileArray; }
From source file:de.fhkoeln.game.utils.libgdx.maps.MapUtils.java
License:Apache License
/** @see #readableHierarchy(com.badlogic.gdx.maps.Map, int) */ public static String readableHierarchy(TiledMapTileSet set, int indent) { String hierarchy = ""; for (int i = 0; i < indent; i++) hierarchy += '\t'; hierarchy += set.getClass().getSimpleName() + ' ' + set.getName() + " (" + set.size() + " tiles)\n"; hierarchy += readableHierarchy(set.getProperties(), indent + 1); for (TiledMapTile tile : set) hierarchy += readableHierarchy(tile, indent + 1); return hierarchy; }
From source file:net.dermetfan.gdx.maps.MapUtils.java
License:Apache License
/** @see #readableHierarchy(com.badlogic.gdx.maps.Map, int) */ public static String readableHierarchy(TiledMapTileSet set, int indent) { StringBuilder hierarchy = new StringBuilder(); for (int i = 0; i < indent; i++) hierarchy.append('\t'); hierarchy.append(ClassReflection.getSimpleName(set.getClass())).append(' ').append(set.getName()) .append(" (").append(set.size()).append(" tiles)\n"); hierarchy.append(readableHierarchy(set.getProperties(), indent + 1)); for (TiledMapTile tile : set) hierarchy.append(readableHierarchy(tile, indent + 1)); return hierarchy.toString(); }