java.lang.Object
technology.sola.engine.assets.AssetLoaderProvider
The AssetLoaderProvider class holds instances of
AssetLoader
s for various Asset
types.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(AssetLoader<?> assetLoader) Adds anAssetLoader
that can be retrieved and used later.<T extends Asset>
AssetLoader<T>Retrieves anAssetLoader
for the desiredAsset
type via the asset's class.
-
Constructor Details
-
AssetLoaderProvider
public AssetLoaderProvider()
-
-
Method Details
-
add
Adds anAssetLoader
that can be retrieved and used later.- Parameters:
assetLoader
- theAssetLoader
to add
-
get
Retrieves anAssetLoader
for the desiredAsset
type via the asset's class.- Type Parameters:
T
- the type of Asset- Parameters:
assetClass
- the class of asset to load- Returns:
- the
AssetLoader
instance for the desired asset class - Throws:
MissingAssetLoaderException
- if there is no asset loader added for desired asset
-