Class AudioSourcePool
java.lang.Object
dev.prozilla.pine.common.asset.pool.AssetPool<AudioSource>
dev.prozilla.pine.common.asset.pool.AudioSourcePool
- All Implemented Interfaces:
Destructible
-
Field Summary
Fields inherited from class dev.prozilla.pine.common.asset.pool.AssetPool
eventDispatcher
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AudioSource
createAsset
(String path) Creates a new asset from a normalized path.Loads an asset from a path or retrieves it from the pool if it has already been loaded once.Methods inherited from class dev.prozilla.pine.common.asset.pool.AssetPool
addListener, count, createKey, destroy, fail, fail, getAssets, normalize, prepareNext, printInfo, printInfo, remove, remove, removeListener
-
Constructor Details
-
AudioSourcePool
public AudioSourcePool()
-
-
Method Details
-
load
Description copied from class:AssetPool
Loads an asset from a path or retrieves it from the pool if it has already been loaded once.This method is protected because some subclasses may require additional parameters to load an asset.
- Overrides:
load
in classAssetPool<AudioSource>
- Parameters:
path
- The path of the asset- Returns:
- The asset, or
null
if it failed to load.
-
createAsset
Description copied from class:AssetPool
Creates a new asset from a normalized path.- Specified by:
createAsset
in classAssetPool<AudioSource>
- Parameters:
path
- The normalized path- Returns:
- The new asset, or
null
if the asset creation failed.
-