Struct GridCoord
This object contains coordinate integer values for each tile in grid
Assembly: cs.temp.dll.dll
Syntax
Constructors
GridCoord(int, int, int)
Declaration
public GridCoord(int lvl, int col, int row)
Parameters
Type |
Name |
Description |
int |
lvl |
|
int |
col |
|
int |
row |
|
Fields
col
This grid coordinate Column
Declaration
Field Value
lvl
This grid coordinate Level
Declaration
Field Value
row
Declaration
Field Value
Methods
CompareTo(object)
Declaration
public int CompareTo(object obj)
Parameters
Type |
Name |
Description |
object |
obj |
|
Returns
Type |
Description |
int |
Length value
|
Distance(GridCoord, GridCoord)
Calculates difference between two coordinates lengths
Declaration
public static int Distance(GridCoord p1, GridCoord p2)
Parameters
Returns
Type |
Description |
int |
Absolute distance
|
Distance(GridCoord)
Calculates difference between two coordinates lengths
Declaration
public int Distance(GridCoord p)
Parameters
Returns
Type |
Description |
int |
Absolute distance
|
Distance(Tile, Tile)
Calculates difference between two coordinates lengths got from Tiles
Declaration
public static int Distance(Tile p1, Tile p2)
Parameters
Returns
Type |
Description |
int |
Absolute distance between Tiles coordinates
|
Equals(GridCoord)
Calculates difference between two coordinates lengths got from Tiles
Declaration
public bool Equals(GridCoord other)
Parameters
Returns
Type |
Description |
bool |
Absolute distance between Tiles coordinates
|
Equals(object)
Calculates difference between two coordinates lengths got from Tiles
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
object |
obj |
|
Returns
Type |
Description |
bool |
Absolute distance between Tiles coordinates
|
Overrides
System.ValueType.Equals(object)
GetHashCode()
Calculates difference between two coordinates lengths got from Tiles
Declaration
public override int GetHashCode()
Returns
Type |
Description |
int |
Absolute distance between Tiles coordinates
|
Overrides
System.ValueType.GetHashCode()
GetWorldPosition(ref Vector3, NavmeshMatrix)
Declaration
public void GetWorldPosition(ref Vector3 position, NavmeshMatrix matrix)
Parameters
Length()
Sum of coordinates Level, Row and Column
Declaration
Returns
Type |
Description |
int |
Length value
|
Set(int, int, int)
Sets new values for this grid coordinate
Declaration
public GridCoord Set(int lvl, int col, int row)
Parameters
Type |
Name |
Description |
int |
lvl |
Level
|
int |
col |
Column
|
int |
row |
Row
|
Returns
Type |
Description |
GridCoord |
This instance reference
|
SetByWorldPosition(Vector3, NavmeshMatrix)
Declaration
public GridCoord SetByWorldPosition(Vector3 position, NavmeshMatrix matrix)
Parameters
Returns
ToString()
Calculates difference between two coordinates lengths got from Tiles
Declaration
public override string ToString()
Returns
Type |
Description |
string |
Absolute distance between Tiles coordinates
|
Overrides
System.ValueType.ToString()
Operators
operator +(GridCoord, GridCoord)
Declaration
public static GridCoord operator +(GridCoord c1, GridCoord c2)
Parameters
Returns
operator ==(GridCoord, GridCoord)
Declaration
public static bool operator ==(GridCoord c1, GridCoord c2)
Parameters
Returns
operator >(GridCoord, GridCoord)
Declaration
public static bool operator >(GridCoord c1, GridCoord c2)
Parameters
Returns
operator >=(GridCoord, GridCoord)
Declaration
public static bool operator >=(GridCoord c1, GridCoord c2)
Parameters
Returns
operator !=(GridCoord, GridCoord)
Declaration
public static bool operator !=(GridCoord c1, GridCoord c2)
Parameters
Returns
operator <(GridCoord, GridCoord)
Declaration
public static bool operator <(GridCoord c1, GridCoord c2)
Parameters
Returns
operator <=(GridCoord, GridCoord)
Declaration
public static bool operator <=(GridCoord c1, GridCoord c2)
Parameters
Returns
operator -(GridCoord, GridCoord)
Declaration
public static GridCoord operator -(GridCoord c1, GridCoord c2)
Parameters
Returns