Class: Terrain

graphics.tmx. Terrain


new Terrain( [init])

A basic terrain definition.

A basic terrain definition.

Parameters:
Name Type Argument Description
init Object <optional>

A generic object containing properties with which to populate the newly instance. If this argument is null, it is ignored.

Extends

Members


name :string

The name of the terrain type.

Type:
  • string
Default Value:
  • null

properties :Array

An array of all user-defined properties of the terrain.

Type:
Default Value:
  • null

tile

The local tile-id of the tile that represents the terrain visually.

Methods


clone()

Returns a shallow copy of the object.

Inherited From:
Returns:

a shallow copy of the object.


setTo(init)

Sets the members of the object to the specified values.

Parameters:
Name Type Description
init Object

The generic object to initialize the object.

Inherited From:
Returns:

The current object reference.


toObject()

Returns the Object representation of this object.

Overrides:
Returns:

the Object representation of this object.


toString()

Returns the string representation of this object.

Inherited From:
Returns:

the string representation of this object.