libgdx API

com.badlogic.gdx.assets.loaders
Class TextureAtlasLoader

java.lang.Object
  extended by com.badlogic.gdx.assets.loaders.AssetLoader<T,P>
      extended by com.badlogic.gdx.assets.loaders.SynchronousAssetLoader<TextureAtlas,TextureAtlasLoader.TextureAtlasParameter>
          extended by com.badlogic.gdx.assets.loaders.TextureAtlasLoader

public class TextureAtlasLoader
extends SynchronousAssetLoader<TextureAtlas,TextureAtlasLoader.TextureAtlasParameter>

AssetLoader to load TextureAtlas instances. Passing a TextureAtlasLoader.TextureAtlasParameter to AssetManager.load(String, Class, AssetLoaderParameters) allows to specify whether the atlas regions should be flipped on the y-axis or not.

Author:
mzechner

Nested Class Summary
static class TextureAtlasLoader.TextureAtlasParameter
           
 
Constructor Summary
TextureAtlasLoader(FileHandleResolver resolver)
           
 
Method Summary
 Array<AssetDescriptor> getDependencies(java.lang.String fileName, TextureAtlasLoader.TextureAtlasParameter parameter)
           
 TextureAtlas load(AssetManager assetManager, java.lang.String fileName, TextureAtlasLoader.TextureAtlasParameter parameter)
           
 
Methods inherited from class com.badlogic.gdx.assets.loaders.AssetLoader
resolve
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextureAtlasLoader

public TextureAtlasLoader(FileHandleResolver resolver)
Method Detail

load

public TextureAtlas load(AssetManager assetManager,
                         java.lang.String fileName,
                         TextureAtlasLoader.TextureAtlasParameter parameter)
Specified by:
load in class SynchronousAssetLoader<TextureAtlas,TextureAtlasLoader.TextureAtlasParameter>

getDependencies

public Array<AssetDescriptor> getDependencies(java.lang.String fileName,
                                              TextureAtlasLoader.TextureAtlasParameter parameter)
Specified by:
getDependencies in class AssetLoader<TextureAtlas,TextureAtlasLoader.TextureAtlasParameter>
Parameters:
fileName - name of the asset to load
parameter - parameters for loading the asset
Returns:
other assets that the asset depends on and need to be loaded first or null if there are no dependencies.

libgdx API

Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)