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