new Tile( [init])
A basic tile definition.
A basic tile 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
-
animations :Array
-
Contains a list of animation frames.
Type:
- Default Value:
-
- null
-
id
-
The local tile-id of the tile that represents the terrain visually.
-
image
-
An tmx image information object.
-
objectgroups :Array
-
Contains a list of object group.
Type:
- Default Value:
-
- null
-
probability
-
A percentage indicating the probability that this tile is chosen when it competes with others while editing with the terrain tool. (optional) (since 0.9)
-
properties :Array
-
An array of all user-defined properties of the tile.
Type:
- Default Value:
-
- null
-
terrain :string
-
Defines the terrain type of each corner of the tile, given as comma-separated indexes in the terrain types array in the order top-left, top-right, bottom-left, bottom-right. Leaving out a value means that corner has no terrain. (optional) (since 0.9)
Type:
- string
- Default Value:
-
- null
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.