libgdx API

com.badlogic.gdx.assets.loaders
Class AssetLoader<T,P extends AssetLoaderParameters<T>>

java.lang.Object
  extended by com.badlogic.gdx.assets.loaders.AssetLoader<T,P>
Type Parameters:
T - the class of the asset the loader supports
P - the class of the loading parameters the loader supports.
Direct Known Subclasses:
AsynchronousAssetLoader, SynchronousAssetLoader

public abstract class AssetLoader<T,P extends AssetLoaderParameters<T>>
extends java.lang.Object

Abstract base class for asset loaders.

Author:
mzechner

Constructor Summary
AssetLoader(FileHandleResolver resolver)
          Constructor, sets the FileHandleResolver to use to resolve the file associated with the asset name.
 
Method Summary
abstract  Array<AssetDescriptor> getDependencies(java.lang.String fileName, P parameter)
           
 FileHandle resolve(java.lang.String fileName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssetLoader

public AssetLoader(FileHandleResolver resolver)
Constructor, sets the FileHandleResolver to use to resolve the file associated with the asset name.

Parameters:
resolver -
Method Detail

resolve

public FileHandle resolve(java.lang.String fileName)
Parameters:
fileName - file name to resolve
Returns:
handle to the file, as resolved by the FileHandleResolver set on the loader

getDependencies

public abstract Array<AssetDescriptor> getDependencies(java.lang.String fileName,
                                                       P parameter)
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)