Kiwi.GameObjects.Tilemap.TileType Class
Define's the properties of a single Type of Tile for a TileMap. This class should not be directly instanted, but instead when wanting to create new TileType's you should use the 'createdTileType' methods on a TileMap object.
Constructor
Kiwi.GameObjects.Tilemap.TileType
-
tilemap
-
index
-
cellIndex
Parameters:
-
tilemap
Kiwi.GameObjects.Tilemap.TileMapThe TileMap that this TileType is a part of.
-
index
NumberThe index of this TileType, which Tiles use when wanting to use this TileType.
-
cellIndex
NumberThe cell number to use when rendering this Type of Tile.
Returns:
This TileType
Methods
objType
()
String
public
The type of object that it is.
Returns:
"TileType"
Properties
allowCollisions
Number
public
The collision information for this type of tile. It's values are the same as the Static properties inside of the ArcadePhysics Component.
Default: NONE
cellIndex
Number
public
A number relating to the cell that should be when rendering a Tile that uses this TileType. A cellIndex of -1 means this type of tile will not be rendered.
index
Number
public
The index of this tile type in the core map data. For example, if your map only has 16 different types of tiles in it, this will be one of those tiles and thus a number between 1 and 16.
offset
Kiwi.Geom.Point
public
The offset of this tile for rendering purposes. Does not affect regular collision detection.
properties
Object
public
The properties associated with this type of tile. These are set when loading a JSON file that had properties associated with a TileType.
tilemap
Kiwi.GameObjects.Tilemap.TileMap
public
A reference to the tilemap this tile object belongs to.