Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Cell

TileMap Cell

A light-weight object that occupies a space in a collision map. Generally created by a TileMap.

Cells can draw multiple sprites. Note that the order of drawing is the order of the sprites in the array so the last one will be drawn on top. You can use transparency to create layers this way.

Hierarchy

  • CellImpl
    • Cell

Index

Constructors

constructor

  • new Cell(config: CellArgs): Cell
  • new Cell(x: number, y: number, width: number, height: number, index: number, solid?: boolean, sprites?: TileSprite[]): Cell

Properties

height

height: number

index

index: number

solid

solid: boolean = false

sprites

sprites: TileSprite[] = []

width

width: number

x

x: number

y

y: number

Accessors

bounds

center

Methods

clearSprites

  • clearSprites(): void

pushSprite

removeSprite