TileInfo

Tile Info - Stores info about how to draw a tile

Constructor

new TileInfo(posopt, sizeopt, textureIndexopt)

Create a tile info object

Parameters:
NameTypeAttributesDefaultDescription
posVector2<optional>
Vector2()

Position of tile in pixels

sizeVector2<optional>
tileSizeDefault

Size of tile in pixels

textureIndexNumber<optional>
0

Texture index to use

Members

pos

Properties
TypeDescription
Vector2

Position of tile in pixels

size

Properties
TypeDescription
Vector2

Size of tile in pixels

textureIndex

Properties
TypeDescription
Number

Texture index to use

Methods

offset(offset) → {TileInfo}

Returns an offset copy of this tile, useful for animation

Parameters:
NameTypeDescription
offsetVector2

Offset to apply in pixels

Returns:
Type: 
TileInfo