Tabnine Logo
TiledMapTileSet.getName
Code IndexAdd Tabnine to your IDE (free)

How to use
getName
method
in
com.badlogic.gdx.maps.tiled.TiledMapTileSet

Best Java code snippets using com.badlogic.gdx.maps.tiled.TiledMapTileSet.getName (Showing top 12 results out of 315)

origin: libgdx/libgdx

/** @param name Name of the {@link TiledMapTileSet} to retrieve.
 * @return tileset with matching name, null if it doesn't exist */
public TiledMapTileSet getTileSet (String name) {
  for (TiledMapTileSet tileset : tilesets) {
    if (name.equals(tileset.getName())) {
      return tileset;
    }
  }
  return null;
}
origin: libgdx/libgdx

/** @param name Name of the {@link TiledMapTileSet} to retrieve.
 * @return tileset with matching name, null if it doesn't exist */
public TiledMapTileSet getTileSet (String name) {
  for (TiledMapTileSet tileset : tilesets) {
    if (name.equals(tileset.getName())) {
      return tileset;
    }
  }
  return null;
}
origin: libgdx/libgdx

private String tilesetNameFromTileId (TiledMap map, int tileid) {
  String name = "";
  if (tileid == 0) {
    return "";
  }
  for (TiledMapTileSet tileset : map.getTileSets()) {
    int firstgid = tileset.getProperties().get("firstgid", -1, Integer.class);
    if (firstgid == -1) continue; // skip this tileset
    if (tileid >= firstgid) {
      name = tileset.getName();
    } else {
      return name;
    }
  }
  return name;
}
origin: libgdx/libgdx

private String tilesetNameFromTileId (TiledMap map, int tileid) {
  String name = "";
  if (tileid == 0) {
    return "";
  }
  for (TiledMapTileSet tileset : map.getTileSets()) {
    int firstgid = tileset.getProperties().get("firstgid", -1, Integer.class);
    if (firstgid == -1) continue; // skip this tileset
    if (tileid >= firstgid) {
      name = tileset.getName();
    } else {
      return name;
    }
  }
  return name;
}
origin: libgdx/libgdx

private void processSingleMap (File mapFile, FileHandle dirHandle, Settings texturePackerSettings) throws IOException {
  boolean combineTilesets = this.settings.combineTilesets;
  if (combineTilesets == false) {
    tilesetUsedIds = new HashMap<String, IntArray>();
    tilesetsToPack = new ObjectMap<String, TiledMapTileSet>();
  }
  map = mapLoader.load(mapFile.getCanonicalPath());
  // if enabled, build a list of used tileids for the tileset used by this map
  boolean stripUnusedTiles = this.settings.stripUnusedTiles;
  if (stripUnusedTiles) {
    stripUnusedTiles();
  } else {
    for (TiledMapTileSet tileset : map.getTileSets()) {
      String tilesetName = tileset.getName();
      if (!tilesetsToPack.containsKey(tilesetName)) {
        tilesetsToPack.put(tilesetName, tileset);
      }
    }
  }
  if (combineTilesets == false) {
    FileHandle tmpHandle = new FileHandle(mapFile.getName());
    this.settings.atlasOutputName = tmpHandle.nameWithoutExtension();
    packTilesets(dirHandle, texturePackerSettings);
  }
  FileHandle tmxFile = new FileHandle(mapFile.getCanonicalPath());
  writeUpdatedTMX(map, tmxFile);
}
origin: libgdx/libgdx

String tilesetName = set.getName();
System.out.println("Processing tileset " + tilesetName);
origin: libgdx/libgdx

String tilesetName = set.getName();
System.out.println("Processing tileset " + tilesetName);
origin: libgdx/libgdx

private void processSingleMap (File mapFile, FileHandle dirHandle, Settings texturePackerSettings) throws IOException {
  boolean combineTilesets = this.settings.combineTilesets;
  if (combineTilesets == false) {
    tilesetUsedIds = new HashMap<String, IntArray>();
    tilesetsToPack = new ObjectMap<String, TiledMapTileSet>();
  }
  map = mapLoader.load(mapFile.getCanonicalPath());
  // if enabled, build a list of used tileids for the tileset used by this map
  boolean stripUnusedTiles = this.settings.stripUnusedTiles;
  if (stripUnusedTiles) {
    stripUnusedTiles();
  } else {
    for (TiledMapTileSet tileset : map.getTileSets()) {
      String tilesetName = tileset.getName();
      if (!tilesetsToPack.containsKey(tilesetName)) {
        tilesetsToPack.put(tilesetName, tileset);
      }
    }
  }
  if (combineTilesets == false) {
    FileHandle tmpHandle = new FileHandle(mapFile.getName());
    this.settings.atlasOutputName = tmpHandle.nameWithoutExtension();
    packTilesets(dirHandle, texturePackerSettings);
  }
  FileHandle tmxFile = new FileHandle(mapFile.getCanonicalPath());
  writeUpdatedTMX(map, tmxFile);
}
origin: com.badlogicgames.gdx/gdx

/** @param name Name of the {@link TiledMapTileSet} to retrieve.
 * @return tileset with matching name, null if it doesn't exist */
public TiledMapTileSet getTileSet (String name) {
  for (TiledMapTileSet tileset : tilesets) {
    if (name.equals(tileset.getName())) {
      return tileset;
    }
  }
  return null;
}
origin: com.badlogicgames.gdx/gdx-tools

private String tilesetNameFromTileId (TiledMap map, int tileid) {
  String name = "";
  if (tileid == 0) {
    return "";
  }
  for (TiledMapTileSet tileset : map.getTileSets()) {
    int firstgid = tileset.getProperties().get("firstgid", -1, Integer.class);
    if (firstgid == -1) continue; // skip this tileset
    if (tileid >= firstgid) {
      name = tileset.getName();
    } else {
      return name;
    }
  }
  return name;
}
origin: com.badlogicgames.gdx/gdx-tools

String tilesetName = set.getName();
System.out.println("Processing tileset " + tilesetName);
origin: com.badlogicgames.gdx/gdx-tools

private void processSingleMap (File mapFile, FileHandle dirHandle, Settings texturePackerSettings) throws IOException {
  boolean combineTilesets = this.settings.combineTilesets;
  if (combineTilesets == false) {
    tilesetUsedIds = new HashMap<String, IntArray>();
    tilesetsToPack = new ObjectMap<String, TiledMapTileSet>();
  }
  map = mapLoader.load(mapFile.getCanonicalPath());
  // if enabled, build a list of used tileids for the tileset used by this map
  boolean stripUnusedTiles = this.settings.stripUnusedTiles;
  if (stripUnusedTiles) {
    stripUnusedTiles();
  } else {
    for (TiledMapTileSet tileset : map.getTileSets()) {
      String tilesetName = tileset.getName();
      if (!tilesetsToPack.containsKey(tilesetName)) {
        tilesetsToPack.put(tilesetName, tileset);
      }
    }
  }
  if (combineTilesets == false) {
    FileHandle tmpHandle = new FileHandle(mapFile.getName());
    this.settings.atlasOutputName = tmpHandle.nameWithoutExtension();
    packTilesets(dirHandle, texturePackerSettings);
  }
  FileHandle tmxFile = new FileHandle(mapFile.getCanonicalPath());
  writeUpdatedTMX(map, tmxFile);
}
com.badlogic.gdx.maps.tiledTiledMapTileSetgetName

Popular methods of TiledMapTileSet

  • getProperties
  • getTile
    Gets the TiledMapTile that has the given id.
  • <init>
    Creates empty tileset
  • putTile
    Adds or replaces tile with that id
  • setName
  • size

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getExternalFilesDir (Context)
  • getResourceAsStream (ClassLoader)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now