public class TmxMapLoader extends BaseTmxMapLoader<TmxMapLoader.Parameters>
| Modifier and Type | Class and Description |
|---|---|
static class |
TmxMapLoader.Parameters |
| Constructor and Description |
|---|
TmxMapLoader() |
TmxMapLoader(FileHandleResolver resolver)
Creates loader
|
| Modifier and Type | Method and Description |
|---|---|
TiledMap |
load(String fileName)
Loads the
TiledMap from the given file. |
TiledMap |
load(String fileName,
TmxMapLoader.Parameters parameter)
Loads the
TiledMap from the given file. |
void |
loadAsync(AssetManager manager,
String fileName,
FileHandle tmxFile,
TmxMapLoader.Parameters parameter)
Loads the non-OpenGL part of the asset and injects any dependencies of the asset into the AssetManager.
|
TiledMap |
loadSync(AssetManager manager,
String fileName,
FileHandle file,
TmxMapLoader.Parameters parameter)
Loads the OpenGL part of the asset.
|
getDependencies, getTileIdsunloadAsyncresolvepublic TmxMapLoader()
public TmxMapLoader(FileHandleResolver resolver)
resolver - public TiledMap load(String fileName)
TiledMap from the given file. The file is resolved via the FileHandleResolver set in the
constructor of this class. By default it will resolve to an internal file. The map will be loaded for a y-up coordinate
system.fileName - the filenamepublic TiledMap load(String fileName, TmxMapLoader.Parameters parameter)
TiledMap from the given file. The file is resolved via the FileHandleResolver set in the
constructor of this class. By default it will resolve to an internal file.fileName - the filenameparameter - specifies whether to use y-up, generate mip maps etc.public void loadAsync(AssetManager manager, String fileName, FileHandle tmxFile, TmxMapLoader.Parameters parameter)
AsynchronousAssetLoaderloadAsync in class AsynchronousAssetLoader<TiledMap,TmxMapLoader.Parameters>fileName - the name of the asset to loadtmxFile - the resolved file to loadparameter - the parameters to use for loading the assetpublic TiledMap loadSync(AssetManager manager, String fileName, FileHandle file, TmxMapLoader.Parameters parameter)
AsynchronousAssetLoaderloadSync in class AsynchronousAssetLoader<TiledMap,TmxMapLoader.Parameters>file - the resolved file to loadCopyright © 2021. All rights reserved.