Search in sources :

Example 1 with AssetManagerImageResolver

use of com.badlogic.gdx.maps.ImageResolver.AssetManagerImageResolver in project libgdx by libgdx.

the class TmxMapLoader method loadAsync.

@Override
public void loadAsync(AssetManager manager, String fileName, FileHandle tmxFile, TmxMapLoader.Parameters parameter) {
    map = null;
    if (parameter != null) {
        convertObjectToTileSpace = parameter.convertObjectToTileSpace;
        flipY = parameter.flipY;
    } else {
        convertObjectToTileSpace = false;
        flipY = true;
    }
    try {
        map = loadTilemap(root, tmxFile, new AssetManagerImageResolver(manager));
    } catch (Exception e) {
        throw new GdxRuntimeException("Couldn't load tilemap '" + fileName + "'", e);
    }
}
Also used : AssetManagerImageResolver(com.badlogic.gdx.maps.ImageResolver.AssetManagerImageResolver) GdxRuntimeException(com.badlogic.gdx.utils.GdxRuntimeException) IOException(java.io.IOException) GdxRuntimeException(com.badlogic.gdx.utils.GdxRuntimeException)

Aggregations

AssetManagerImageResolver (com.badlogic.gdx.maps.ImageResolver.AssetManagerImageResolver)1 GdxRuntimeException (com.badlogic.gdx.utils.GdxRuntimeException)1 IOException (java.io.IOException)1