public class SkinLoader extends AsynchronousAssetLoader<Skin,SkinLoader.SkinParameter>
AssetLoader
for Skin
instances. All Texture
and BitmapFont
instances will be loaded as
dependencies. Passing a SkinLoader.SkinParameter
allows one to specify the exact name of the texture associated with the skin.
Otherwise the skin texture is looked up just as with a call to Skin.Skin(com.badlogic.gdx.files.FileHandle)
.Modifier and Type | Class and Description |
---|---|
static class |
SkinLoader.SkinParameter |
Constructor and Description |
---|
SkinLoader(FileHandleResolver resolver) |
Modifier and Type | Method and Description |
---|---|
Array<AssetDescriptor> |
getDependencies(java.lang.String fileName,
FileHandle file,
SkinLoader.SkinParameter parameter)
Returns the assets this asset requires to be loaded first.
|
void |
loadAsync(AssetManager manager,
java.lang.String fileName,
FileHandle file,
SkinLoader.SkinParameter parameter)
Loads the non-OpenGL part of the asset and injects any dependencies of the asset into the AssetManager.
|
Skin |
loadSync(AssetManager manager,
java.lang.String fileName,
FileHandle file,
SkinLoader.SkinParameter parameter)
Loads the OpenGL part of the asset.
|
resolve
public SkinLoader(FileHandleResolver resolver)
public Array<AssetDescriptor> getDependencies(java.lang.String fileName, FileHandle file, SkinLoader.SkinParameter parameter)
AssetLoader
getDependencies
in class AssetLoader<Skin,SkinLoader.SkinParameter>
fileName
- name of the asset to loadfile
- the resolved file to loadparameter
- parameters for loading the assetpublic void loadAsync(AssetManager manager, java.lang.String fileName, FileHandle file, SkinLoader.SkinParameter parameter)
AsynchronousAssetLoader
loadAsync
in class AsynchronousAssetLoader<Skin,SkinLoader.SkinParameter>
fileName
- the name of the asset to loadfile
- the resolved file to loadparameter
- the parameters to use for loading the assetpublic Skin loadSync(AssetManager manager, java.lang.String fileName, FileHandle file, SkinLoader.SkinParameter parameter)
AsynchronousAssetLoader
loadSync
in class AsynchronousAssetLoader<Skin,SkinLoader.SkinParameter>
file
- the resolved file to load