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 |
---|---|
CornerIndex | 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.Mathematics.int2 | 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
Type | Name | Description |
---|---|---|
Object | obj | The Object to compare with this instance. |
Returns
Type | Description |
---|---|
Boolean |
|
Overrides
Equals(TileCorner)
Equalses the specified other.
Declaration
public bool Equals(TileCorner other)
Parameters
Type | Name | Description |
---|---|---|
TileCorner | 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 |
---|---|
TileCorner | 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 |
---|---|
TileCorner | 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 |
---|---|
TileCorner | The tile corner that is rotated 90 degrees in counter-clockwise direction. |
ToString()
Converts to string.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | A String that represents this instance. |
Overrides
Operators
Equality(TileCorner, TileCorner)
Implements the operator ==.
Declaration
public static bool operator ==(TileCorner left, TileCorner right)
Parameters
Type | Name | Description |
---|---|---|
TileCorner | left | The left. |
TileCorner | 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 |
---|---|---|
TileCorner | left | The left. |
TileCorner | right | The right. |
Returns
Type | Description |
---|---|
Boolean | The result of the operator. |