Package arc.assets.loaders
Class AssetLoader<T,P extends AssetLoaderParameters<T>>
java.lang.Object
arc.assets.loaders.AssetLoader<T,P>
- Type Parameters:
T
- the class of the asset the loader supportsP
- the class of the loading parameters the loader supports.
- Direct Known Subclasses:
AsynchronousAssetLoader
,SynchronousAssetLoader
Abstract base class for asset loaders.
-
Constructor Summary
ConstructorDescriptionAssetLoader
(FileHandleResolver resolver) Constructor, sets theFileHandleResolver
to use to resolve the file associated with the asset name. -
Method Summary
Modifier and TypeMethodDescriptionabstract Seq<AssetDescriptor>
getDependencies
(String fileName, Fi file, P parameter) Returns the assets this asset requires to be loaded first.
-
Constructor Details
-
AssetLoader
Constructor, sets theFileHandleResolver
to use to resolve the file associated with the asset name.
-
-
Method Details
-
resolve
- Parameters:
fileName
- file name to resolve- Returns:
- handle to the file, as resolved by the
FileHandleResolver
set on the loader
-
getDependencies
Returns the assets this asset requires to be loaded first. This method may be called on a thread other than the GL thread.- Parameters:
fileName
- name of the asset to loadfile
- the resolved file to loadparameter
- 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.
-