Constructors

Properties

isLoadingInForeground: boolean = true

It's set to true during intermediary loading screen to use a greater concurrency as the game is paused and doesn't need bandwidth (for video or music streaming or online multiplayer).

loadingStates: Map<string, LoadingTaskState> = ...

Resources and the loading state of each task, indexed by task identifier.

Don't change its state outside of ResourceLoadingQueue.

currentLoadingTaskIdentifier: string = ''

The name of the task for which resources are currently being loaded.

currentTaskProgress: number = 0

The progress, between 0 and 1, of the loading of the resource, for the task that is being loaded (see currentLoadingTaskIdentifier).

getResourcesDifference: ResourceDifferenceOperation
loadingTaskQueue: LoadingTask[] = ...

A queue of loading task whose resources are still to be pre-loaded.

name: string
resourceLoader: PrivateResourceManager
shouldProcessResources: boolean

Methods

  • Parameters

    • taskIdentifier: string

    Returns boolean

    true when all the resources of the given task are loaded (but maybe not parsed).

  • Parameters

    • taskIdentifier: string

    Returns boolean

    true when all the resources of the given task are loaded and parsed.

  • Put a given scene at the end of the queue.

    When the scene that is currently loading in background is done, this scene will be the next to be loaded.

    Parameters

    • taskIdentifier: string

    Returns null | LoadingTask

  • Process resources that are needed right away.

    Parameters

    • taskIdentifier: string
    • Optional onProgress: ((count, total) => Promise<void>)
        • (count, total): Promise<void>
        • Parameters

          • count: number
          • total: number

          Returns Promise<void>

    Returns Promise<void>

  • Parameters

    • taskIdentifier: string
    • usedResources: ResourceReference[]

    Returns void

  • Parameters

    • taskIdentifier: string
    • status: "not-loaded" | "loaded" | "ready"

    Returns void

  • Parameters

    • unloadedTaskIdentifier: string
    • newTaskIdentifier: null | string = null

    Returns void