Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • AssetManager

Index

Constructors

Properties

MESSAGE_ASSET_LOADER_ASSET_LOADED: string = "MESSAGE_ASSET_LOADER_ASSET_LOADED"
_loadedAssets: Map<string, IAsset> = ...
_loaders: IAssetLoader[] = ...

Methods

  • getAsset(assetName: string): undefined | IAsset
  • initialize(): void
  • Initializes the asset loadeer with the standard loaders; JSON and Images (png, gif, jpg)

    see

    ImageAssetLoader

    see

    JsonAssetLoader

    Returns void

    void

  • isAssetLoaded(assetName: string): boolean
  • Checks if the asset is loaded or not.

    Parameters

    • assetName: string

    Returns boolean

    boolean

  • loadAsset(assetName: string): void
  • Loads an asset based on the file type with a loader in the asset manager. Throws an error if the asset is not loaded.

    see

    IAssetLoader

    Parameters

    • assetName: string

    Returns void

    void

  • onAssetLoaded(asset: IAsset): void
  • Called when the asset is loaded. Sends a message letting any listeners know the asset specified is loaded.

    Parameters

    Returns void

    void

Generated using TypeDoc