C# Класс Sharpex2D.Common.Pathfinding.Grid

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
GetNeighbors ( int x, int y ) : Sharpex2D.Common.Pathfinding.Neighbor[]

Returns all Neighbors of a field.

Описание методов

GetDistance() публичный Метод

Gets the distance between two GridFields.
public GetDistance ( GridField first, GridField second ) : int
first GridField The first GridField.
second GridField The second GridField.
Результат int

GetGridField() публичный Метод

Returns a GridField on the specific position.
public GetGridField ( int x, int y ) : GridField
x int The X-Coord.
y int The Y-Coord.
Результат GridField

Grid() публичный Метод

Initializes a new Grid class.
public Grid ( int width, int height ) : System.Collections.Generic
width int The Width.
height int The Height.
Результат System.Collections.Generic