예제 #1
0
 /**
  * Create a new tile map based on a given TMX file
  *
  * @param ref The location of the tile map to load
  * @param loadTileSets True if we want to load tilesets - including their image data
  * @throws SlickException Indicates a failure to load the tilemap
  */
 public TiledMap(String ref, boolean loadTileSets) throws SlickException {
   this.loadTileSets = loadTileSets;
   ref = ref.replace('\\', '/');
   load(ResourceLoader.getResourceAsStream(ref), ref.substring(0, ref.lastIndexOf("/")));
 }
예제 #2
0
 /**
  * Create a new tile map based on a given TMX file
  *
  * @param ref The location of the tile map to load
  * @param tileSetsLocation The location where we can find the tileset images and other resources
  * @throws SlickException Indicates a failure to load the tilemap
  */
 public TiledMap(String ref, String tileSetsLocation) throws SlickException {
   load(ResourceLoader.getResourceAsStream(ref), tileSetsLocation);
 }