Struct TileCorner
Represents a corner of a single tile at a given tile position.
Namespace: TycoonTerrain.Core
Assembly: TycoonTerrainAssembly.dll
Syntax
public struct TileCorner : IEquatable<TileCorner>
Properties
Corner
Gets the corner index of this tile corner.
Declaration
public CornerIndex Corner { get; }
Property Value
Type | Description |
---|---|
Corner |
The corner index of this tile corner. |
TilePosition
Gets the tile position of this tile corner.
Declaration
public int2 TilePosition { get; }
Property Value
Type | Description |
---|---|
Unity. |
The tile position of this tile corner. |
Methods
Equals(Object)
Determines whether the specified Object, is equal to this instance.
Declaration
public override bool Equals(object obj)
Parameters
Returns
Overrides
Equals(TileCorner)
Equalses the specified other.
Declaration
public bool Equals(TileCorner other)
Parameters
Type | Name | Description |
---|---|---|
Tile |
other | The other. |
Returns
Type | Description |
---|---|
Boolean |
|
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Overrides
OppositeCorner()
Gets the tile corner that opposite of this tile corner.
Declaration
public TileCorner OppositeCorner()
Returns
Type | Description |
---|---|
Tile |
The opposite tile corner of the same tile. |
RotateClockWise()
Gets the tile corner that is rotated 90 degrees in clockwise direction when view top-down.
Declaration
public TileCorner RotateClockWise()
Returns
Type | Description |
---|---|
Tile |
The tile corner that is rotated 90 degrees in clockwise direction. |
RotateCounterClockWise()
Gets the tile corner that is rotated 90 degrees in counter-clockwise direction when view top-down.
Declaration
public TileCorner RotateCounterClockWise()
Returns
Type | Description |
---|---|
Tile |
The tile corner that is rotated 90 degrees in counter-clockwise direction. |
ToString()
Converts to string.
Declaration
public override string ToString()
Returns
Overrides
Operators
Equality(TileCorner, TileCorner)
Implements the operator ==.
Declaration
public static bool operator ==(TileCorner left, TileCorner right)
Parameters
Type | Name | Description |
---|---|---|
Tile |
left | The left. |
Tile |
right | The right. |
Returns
Type | Description |
---|---|
Boolean | The result of the operator. |
Inequality(TileCorner, TileCorner)
Implements the operator !=.
Declaration
public static bool operator !=(TileCorner left, TileCorner right)
Parameters
Type | Name | Description |
---|---|---|
Tile |
left | The left. |
Tile |
right | The right. |
Returns
Type | Description |
---|---|
Boolean | The result of the operator. |