Package arc.assets

Class AssetDescriptor<T>

java.lang.Object
arc.assets.AssetDescriptor<T>

public class AssetDescriptor<T> extends Object
Describes an asset to be loaded by its filename, type and AssetLoaderParameters. Instances of this are used in AssetLoadingTask to load the actual asset.
  • Field Details

    • fileName

      public final String fileName
    • type

      public final Class<T> type
    • params

      public final AssetLoaderParameters params
    • file

      public Fi file
      The resolved file. May be null if the fileName has not been resolved yet.
    • loaded

      public Cons<T> loaded
      Callback for when this asset is loaded.
    • errored

      @Nullable public Cons<Throwable> errored
      Callback for when this asset has an error.
  • Constructor Details

    • AssetDescriptor

      public AssetDescriptor(Class<T> assetType)
    • AssetDescriptor

      public AssetDescriptor(String fileName, Class<T> assetType)
    • AssetDescriptor

      public AssetDescriptor(Fi file, Class<T> assetType)
      Creates an AssetDescriptor with an already resolved name.
    • AssetDescriptor

      public AssetDescriptor(String fileName, Class<T> assetType, AssetLoaderParameters<T> params)
    • AssetDescriptor

      public AssetDescriptor(Fi file, Class<T> assetType, AssetLoaderParameters<T> params)
      Creates an AssetDescriptor with an already resolved name.
  • Method Details