Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ILoader

Hierarchy

Implemented by

Index

Properties

oncomplete

oncomplete: function

oncomplete handler

Type declaration

    • (): void
    • Returns void

onerror

onerror: function

onerror handler

Type declaration

    • (e: any): void
    • Parameters

      • e: any

      Returns void

onprogress

onprogress: function

onprogress handler

Type declaration

    • (e: any): void
    • Parameters

      • e: any

      Returns void

Methods

draw

  • draw(ctx: CanvasRenderingContext2D, delta: number): any
  • Parameters

    • ctx: CanvasRenderingContext2D
    • delta: number

    Returns any

getData

  • getData(): any
  • Gets the data that was loaded

    Returns any

isLoaded

  • isLoaded(): boolean
  • Returns true if the loadable is loaded

    Returns boolean

load

  • Begins loading the resource and returns a promise to be resolved on completion

    Returns Promise<any>

processData

  • processData(data: any): any
  • Processes the downloaded data. Meant to be overridden.

    Parameters

    • data: any

    Returns any

setData

  • setData(data: any): void
  • Sets the data (can be populated from remote request or in-memory data)

    Parameters

    • data: any

    Returns void

update

  • update(engine: Engine, delta: number): any
  • Parameters

    • engine: Engine
    • delta: number

    Returns any

wireEngine

  • wireEngine(engine: Engine): void
  • Wires engine into loadable to receive game level events

    Parameters

    Returns void