AssetLoader for Skin instances. All Texture and BitmapFont instances will be loaded as
dependencies. Passing a SkinParameter allows the exact name of the texture associated with the skin to be specified.
Otherwise the skin texture is looked up just as with a call to Skin#Skin(com.badlogic.gdx.files.FileHandle) . A
SkinParameter also allows named resources to be set that will be added to the skin before loading the json file,
meaning that they can be referenced from inside the json file itself. This is useful for dynamic resources such as a BitmapFont
generated through FreeTypeFontGenerator.
| Modifier and Type | Class and Description |
|---|---|
| public static class |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Array | getDependencies(String fileName, FileHandle file, SkinLoader.
Implements abstract com. Returns the assets this asset requires to be loaded first. |
| public void | loadAsync(AssetManager manager, String fileName, FileHandle file, SkinLoader.
Implements abstract com. Loads the non-OpenGL part of the asset and injects any dependencies of the asset into the AssetManager. |
| public Skin | loadSync(AssetManager manager, String fileName, FileHandle file, SkinLoader.
Implements abstract com. Loads the OpenGL part of the asset. |
| protected Skin | Returns: A new Skin (or subclass of Skin) instance based on the provided TextureAtlas.The TextureAtlas that the skin will use. atlas)Override to allow subclasses of Skin to be loaded or the skin instance to be configured. |
| SkinLoader | back to summary |
|---|---|
| public SkinLoader(FileHandleResolver resolver) | |
| getDependencies | back to summary |
|---|---|
| public Array Implements abstract com. Doc from com. Returns the assets this asset requires to be loaded first. This method may be called on a thread other than the GL thread.
| |
| loadAsync | back to summary |
|---|---|
| public void loadAsync(AssetManager manager, String fileName, FileHandle file, SkinLoader. Implements abstract com. Doc from com. Loads the non-OpenGL part of the asset and injects any dependencies of the asset into the AssetManager.
| |
| loadSync | back to summary |
|---|---|
| public Skin loadSync(AssetManager manager, String fileName, FileHandle file, SkinLoader. Implements abstract com. Doc from com. Loads the OpenGL part of the asset.
| |
| newSkin | back to summary |
|---|---|
| protected Skin newSkin(TextureAtlas atlas) Override to allow subclasses of Skin to be loaded or the skin instance to be configured.
| |
| Modifier and Type | Field and Description |
|---|---|
| public final ObjectMap | |
| public final String |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public |
| resources | back to summary |
|---|---|
| public final ObjectMap<String, Object> resources | |
| textureAtlasPath | back to summary |
|---|---|
| public final String textureAtlasPath | |
| SkinParameter | back to summary |
|---|---|
| public SkinParameter() | |
| SkinParameter | back to summary |
|---|---|
| public SkinParameter(ObjectMap<String, Object> resources) | |
| SkinParameter | back to summary |
|---|---|
| public SkinParameter(String textureAtlasPath) | |
| SkinParameter | back to summary |
|---|---|
| public SkinParameter(String textureAtlasPath, ObjectMap<String, Object> resources) | |