C# Class Sharpex2D.Common.Pathfinding.Grid

Show file Open project: ThuCommix/Sharpex2D Class Usage Examples

Public Methods

Method Description
GetDistance ( GridField first, GridField second ) : int

Gets the distance between two GridFields.

GetGridField ( int x, int y ) : GridField

Returns a GridField on the specific position.

Grid ( int width, int height ) : System.Collections.Generic

Initializes a new Grid class.

Private Methods

Method Description
GetNeighbors ( int x, int y ) : Sharpex2D.Common.Pathfinding.Neighbor[]

Returns all Neighbors of a field.

Method Details

GetDistance() public method

Gets the distance between two GridFields.
public GetDistance ( GridField first, GridField second ) : int
first GridField The first GridField.
second GridField The second GridField.
return int

GetGridField() public method

Returns a GridField on the specific position.
public GetGridField ( int x, int y ) : GridField
x int The X-Coord.
y int The Y-Coord.
return GridField

Grid() public method

Initializes a new Grid class.
public Grid ( int width, int height ) : System.Collections.Generic
width int The Width.
height int The Height.
return System.Collections.Generic