Constructor
new TileInfo(posopt, sizeopt, textureIndexopt)
Create a tile info object
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
pos | Vector2 | <optional> | Vector2() | Position of tile in pixels |
size | Vector2 | <optional> | tileSizeDefault | Size of tile in pixels |
textureIndex | Number | <optional> | 0 | Texture index to use |
- Source
Members
pos
PropertiesType | Description |
---|---|
Vector2 | Position of tile in pixels |
- Source
size
PropertiesType | Description |
---|---|
Vector2 | Size of tile in pixels |
- Source
textureIndex
PropertiesType | Description |
---|---|
Number | Texture index to use |
- Source
Methods
offset(offset) → {TileInfo}
Returns an offset copy of this tile, useful for animation
Parameters:
Name | Type | Description |
---|---|---|
offset | Vector2 | Offset to apply in pixels |
- Source
Returns:
- Type:
- TileInfo