Gamalto

Fork me on GitHub

Object TiledBlock Overview

Gamalto. TiledBlock

new Gamalto.TiledBlock(ts, data, rows)

Creates a new rectangular tile-based image.

Parameters
Name Type Description
ts Gamalto.TileSet

Tilset to be used to render the map.

data array.<number>

List of tile indices representing the image.

rows number

Horizontal size the of image in tiles.

Extends

Members

data :array.<number>

inherited readonly

List of tile indices representing the image.

Inherited From

height :number

inherited readonly

Vertical size of the image in tiles.

Inherited From
Implements

tag :object

inherited

Utility property to exchange data between objects.

Inherited From

width :number

inherited readonly

Horizontal size of the image in tiles.

Inherited From
Implements

Methods

clone() object

inherited abstract

Clones the object. It will be shallow copy unless otherwise specfied.

Inherited From
Returns
  • New instance of the object. Defaults to null.

draw(renderer, x, y)

Renders the tile-based image.

Parameters
Name Type Description
renderer Gamalto.BaseRenderer

Renderer of the Gamalto.surface to which the image will be rendered.

x number

Horizontal drawing position.

y number

Vertical drawing position.

setData(data, width, height)

inherited

Sets the data needed to render the tile-based image.

Parameters
Name Type Description
data array.<number>

List of tile indices representing the image.

width number

Horizontal size of the image in tiles.

height number

Vertical size of the image in tiles.

Inherited From

toString() string

inherited abstract

Converts the object into a string.

Inherited From
Returns
  • string

Documentation generated by JSDoc 3.3.2 on Sun Sep 13 2015 20:13:31 GMT+0200 (CEST)