C# Класс ctac.MapService

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

Private Properties

Свойство Тип Описание
CheckNeighbors Tile>.Dictionary
GetTilesInRadiusGeneric Tile>.Dictionary
ReconstructPath List
getValueOrMax int
heuristic_cost_estimate int

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

Метод Описание
Expand ( List selection, int distance ) : Tile>.Dictionary
FindPath ( Tile start, Tile end, int maxDist, int controllingPlayerId ) : List
GetCrossTiles ( Vector2 center, int distance ) : Tile>.Dictionary
GetDiagonalNeighbors ( Vector2 center ) : Tile>.Dictionary
GetDiagonalTilesInRadius ( Vector2 center, int distance ) : Tile>.Dictionary
GetKingNeighbors ( Vector2 center ) : Tile>.Dictionary
GetKingTilesInRadius ( Vector2 center, int distance ) : Tile>.Dictionary
GetLineTiles ( Vector2 center, Vector2 secondPoint, int distance, bool bothDirections ) : Tile>.Dictionary
GetMovableNeighbors ( Tile center, int controllingPlayerId, Tile dest = null ) : Tile>.Dictionary

Find neighboring tiles that aren't occupied by enemies, but always include the dest tile for attacking if it's passed but also make sure not to land on a tile with an occupant if attacking

GetMovementTilesInRadius ( Vector2 center, int distance, int controllingPlayerId ) : Tile>.Dictionary
GetNeighbors ( Vector2 center ) : Tile>.Dictionary
GetTilesInRadius ( Vector2 center, int distance ) : Tile>.Dictionary
KingDistance ( Vector2 a, Vector2 b ) : int
Tile ( Vector2 position ) : Tile
TileDistance ( Vector2 a, Vector2 b ) : int
isHeightPassable ( Tile start, Tile end ) : bool

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

Метод Описание
CheckNeighbors ( Vector2 toCheck ) : Tile>.Dictionary
GetTilesInRadiusGeneric ( Vector2 center, int distance, Tile>.Func neighborsFunc, Func distanceFunc ) : Tile>.Dictionary
ReconstructPath ( Tile>.Dictionary came_from, Tile current ) : List
getValueOrMax ( int>.Dictionary dict, Tile key ) : int
heuristic_cost_estimate ( Tile start, Tile end ) : int

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

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

public Expand ( List selection, int distance ) : Tile>.Dictionary
selection List
distance int
Результат Tile>.Dictionary

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

public FindPath ( Tile start, Tile end, int maxDist, int controllingPlayerId ) : List
start Tile
end Tile
maxDist int
controllingPlayerId int
Результат List

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

public GetCrossTiles ( Vector2 center, int distance ) : Tile>.Dictionary
center Vector2
distance int
Результат Tile>.Dictionary

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

public GetDiagonalNeighbors ( Vector2 center ) : Tile>.Dictionary
center Vector2
Результат Tile>.Dictionary

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

public GetDiagonalTilesInRadius ( Vector2 center, int distance ) : Tile>.Dictionary
center Vector2
distance int
Результат Tile>.Dictionary

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

public GetKingNeighbors ( Vector2 center ) : Tile>.Dictionary
center Vector2
Результат Tile>.Dictionary

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

public GetKingTilesInRadius ( Vector2 center, int distance ) : Tile>.Dictionary
center Vector2
distance int
Результат Tile>.Dictionary

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

public GetLineTiles ( Vector2 center, Vector2 secondPoint, int distance, bool bothDirections ) : Tile>.Dictionary
center Vector2
secondPoint Vector2
distance int
bothDirections bool
Результат Tile>.Dictionary

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

Find neighboring tiles that aren't occupied by enemies, but always include the dest tile for attacking if it's passed but also make sure not to land on a tile with an occupant if attacking
public GetMovableNeighbors ( Tile center, int controllingPlayerId, Tile dest = null ) : Tile>.Dictionary
center Tile
controllingPlayerId int
dest Tile
Результат Tile>.Dictionary

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

public GetMovementTilesInRadius ( Vector2 center, int distance, int controllingPlayerId ) : Tile>.Dictionary
center Vector2
distance int
controllingPlayerId int
Результат Tile>.Dictionary

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

public GetNeighbors ( Vector2 center ) : Tile>.Dictionary
center Vector2
Результат Tile>.Dictionary

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

public GetTilesInRadius ( Vector2 center, int distance ) : Tile>.Dictionary
center Vector2
distance int
Результат Tile>.Dictionary

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

public KingDistance ( Vector2 a, Vector2 b ) : int
a Vector2
b Vector2
Результат int

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

public Tile ( Vector2 position ) : Tile
position Vector2
Результат Tile

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

public TileDistance ( Vector2 a, Vector2 b ) : int
a Vector2
b Vector2
Результат int

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

public isHeightPassable ( Tile start, Tile end ) : bool
start Tile
end Tile
Результат bool