public class TextureLoader extends java.lang.Object implements AsyncAssetLoader<Texture>
Constructor and Description |
---|
TextureLoader() |
Modifier and Type | Method and Description |
---|---|
org.mini2Dx.gdx.utils.Array<AssetDescriptor> |
getDependencies(AssetDescriptor assetDescriptor,
AsyncLoadingCache asyncLoadingCache)
Returns an
Array of assets that the requested asset depends on |
void |
loadOnAsyncThread(AssetDescriptor assetDescriptor,
AsyncLoadingCache asyncLoadingCache)
Loads an asset (or partial data) via a non-main thread
|
boolean |
loadOnGameThread(AssetManager assetManager,
AssetDescriptor<Texture> assetDescriptor,
AsyncLoadingCache asyncLoadingCache,
AssetLoaderResult<Texture> resultHolder)
Loads an asset on the main game thread
|
public boolean loadOnGameThread(AssetManager assetManager, AssetDescriptor<Texture> assetDescriptor, AsyncLoadingCache asyncLoadingCache, AssetLoaderResult<Texture> resultHolder)
AssetLoader
loadOnGameThread
in interface AssetLoader<Texture>
assetManager
- The AssetManager
executing the loadingassetDescriptor
- A descriptor of the asset to be loadedasyncLoadingCache
- Stores values loaded on other threadsresultHolder
- Stores the resulting objectpublic void loadOnAsyncThread(AssetDescriptor assetDescriptor, AsyncLoadingCache asyncLoadingCache)
AsyncAssetLoader
loadOnAsyncThread
in interface AsyncAssetLoader<Texture>
assetDescriptor
- A descriptor of the asset to be loadedasyncLoadingCache
- Stores data in this cache to pass to the game thread loadingpublic org.mini2Dx.gdx.utils.Array<AssetDescriptor> getDependencies(AssetDescriptor assetDescriptor, AsyncLoadingCache asyncLoadingCache)
AssetLoader
Array
of assets that the requested asset depends ongetDependencies
in interface AssetLoader<Texture>
assetDescriptor
- A descriptor of the asset to be loadedasyncLoadingCache
- Stores values loaded on other threadsArray
or null if there's no dependencies