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 |
---|---|
Array<AssetDescriptor> |
getDependencies(String fileName,
FileHandle tmxFile,
TmxMapLoader.Parameters parameter)
Retrieves TiledMap resource dependencies
|
TiledMap |
load(String fileName)
Loads the
TiledMap from the given file. |
TiledMap |
load(String fileName,
TmxMapLoader.Parameters parameters)
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.
|
getTileIds
resolve
public 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 parameters)
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 filenameparameters
- specifies whether to use y-up, generate mip maps etc.public void loadAsync(AssetManager manager, String fileName, FileHandle tmxFile, TmxMapLoader.Parameters parameter)
AsynchronousAssetLoader
loadAsync
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)
AsynchronousAssetLoader
loadSync
in class AsynchronousAssetLoader<TiledMap,TmxMapLoader.Parameters>
file
- the resolved file to loadpublic Array<AssetDescriptor> getDependencies(String fileName, FileHandle tmxFile, TmxMapLoader.Parameters parameter)
getDependencies
in class AssetLoader<TiledMap,TmxMapLoader.Parameters>
fileName
- parameter
- not used for nowtmxFile
- the resolved file to loadCopyright © 2017. All rights reserved.