Class AudioSourcePool

java.lang.Object
dev.prozilla.pine.common.asset.pool.AssetPool<AudioSource>
dev.prozilla.pine.common.asset.pool.AudioSourcePool
All Implemented Interfaces:
MultiAssetLoader<AudioSource>, Destructible

public final class AudioSourcePool extends AssetPool<AudioSource> implements MultiAssetLoader<AudioSource>
  • Constructor Details

    • AudioSourcePool

      public AudioSourcePool()
  • Method Details

    • load

      public AudioSource load(String path)
      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.

      Specified by:
      load in interface MultiAssetLoader<AudioSource>
      Overrides:
      load in class AssetPool<AudioSource>
      Parameters:
      path - The path of the asset
      Returns:
      The asset, or null if it failed to load.
    • createAsset

      protected AudioSource createAsset(String path)
      Description copied from class: AssetPool
      Creates a new asset from a normalized path.
      Specified by:
      createAsset in class AssetPool<AudioSource>
      Parameters:
      path - The normalized path
      Returns:
      The new asset, or null if the asset creation failed.