Class Extensions
Contains extension methods for Tycoon Tile.
Namespace: TycoonTerrain.Core
Assembly: TycoonTerrainAssembly.dll
Syntax
public static class Extensions
Methods
Highest(IEnumerable<TileHandle>)
Gets the highests tile corner height within the specified tiles.
Declaration
public static byte Highest(this IEnumerable<TileHandle> tiles)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<TileHandle> | tiles | The tiles. |
Returns
Type | Description |
---|---|
Byte | The highests tile corner height within the specified tiles. |
IsFlat(IEnumerable<TileHandle>)
Returns whether all tiles in the sequence are flat and of the same height.
Declaration
public static bool IsFlat(this IEnumerable<TileHandle> tiles)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<TileHandle> | tiles | The tiles. |
Returns
Type | Description |
---|---|
Boolean |
Lowest(IEnumerable<TileHandle>)
Gets the lowest tile corner height within the specified tiles.
Declaration
public static byte Lowest(this IEnumerable<TileHandle> tiles)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<TileHandle> | tiles | The tiles. |
Returns
Type | Description |
---|---|
Byte | The lowest tile corner height within the specified tiles. |
NotWithin(IEnumerable<TileHandle>, IEnumerable<IntBound>)
Gets the tiles that are not within the specified bounds.
Declaration
public static IEnumerable<TileHandle> NotWithin(this IEnumerable<TileHandle> tiles, IEnumerable<IntBound> bounds)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<TileHandle> | tiles | The tiles. |
IEnumerable<IntBound> | bounds | The bounds. |
Returns
Type | Description |
---|---|
IEnumerable<TileHandle> | The tiles that are not within the specified bounds. |
Within(IEnumerable<TileHandle>, IEnumerable<IntBound>)
Gets the tiles that are within the specified bounds.
Declaration
public static IEnumerable<TileHandle> Within(this IEnumerable<TileHandle> tiles, IEnumerable<IntBound> bounds)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<TileHandle> | tiles | The tiles. |
IEnumerable<IntBound> | bounds | The bounds. |
Returns
Type | Description |
---|---|
IEnumerable<TileHandle> | The tiles that are within the specified bounds. |