Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Sprite

Index

Constructors

  • new Sprite(renderer: any, image: HTMLImageElement, sWidth: number, sHeight: number, frames: number[][], duration: number, dWidth: number, dHeight: number): Sprite
  • Parameters

    • renderer: any
    • image: HTMLImageElement
    • sWidth: number
    • sHeight: number
    • frames: number[][]
    • duration: number
    • dWidth: number
    • dHeight: number

    Returns Sprite

Properties

dHeight: number
dWidth: number
duration: number
frames: number[][] = []
grid: { height: number; position: { x: number; y: number }; positions: { x: number; y: number }[]; tile: Tile; width: number }[][]
image: HTMLImageElement
index: number[] = []
renderer: any
sHeight: number
sWidth: number

Methods

  • draw(dX: number, dY: number, renderLoop: RenderLoop, frameIndex?: number[]): void
  • Parameters

    • dX: number
    • dY: number
    • renderLoop: RenderLoop
    • Optional frameIndex: number[]

    Returns void