|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
com.b3dgs.lionengine.utility.LevelRipConverter<TType>
TType
- tile type used.public final class LevelRipConverter<TType extends DefaultTile>
This class allows to convert a map image to a map level format. Example:
LevelRipConverter<Tile> rip = new LevelRipConverter<>(); rip.start(Files.getMedia("level.png"), this.map, Files.getPath("tiles"), "Forest", false); FileWriter fw; try { fw = File.FILE.createFileWriter(Files.getMedia("level.map")); this.map.save(fw); fw.close(); } catch (IOException ex) { }
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
LevelRipConverter()
Create a new level rip converter. |
Method Summary | |
---|---|
void |
run()
|
void |
start(java.lang.String levelrip,
AbstractTileMap<TType> map,
java.lang.String tilesDir,
java.lang.String tilesTheme,
boolean reversed)
Must be called to start convertion. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LevelRipConverter()
Method Detail |
---|
public void start(java.lang.String levelrip, AbstractTileMap<TType> map, java.lang.String tilesDir, java.lang.String tilesTheme, boolean reversed)
levelrip
- file containing the levelrip as an image.map
- destination map reference.tilesDir
- dir containing tiles themes.tilesTheme
- subdir (theme) for tiles.reversed
- true will read from bottom to top, false will read from top to bottom.public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |