Click or drag to resize

GridPoint2GetVectorNeighbors Method

Gets the vector neighbors of this point in the given direction.

Namespace:  Gamelogic.Grids2
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public IEnumerable<GridPoint2> GetVectorNeighbors(
	IEnumerable<GridPoint2> directions
)

Parameters

directions
Type: System.Collections.GenericIEnumerableGridPoint2
A list of points that represents where the neighbors are.

Return Value

Type: IEnumerableGridPoint2
Remarks
The vector neighbors of a point is calculated by adding the point to each of the vector directions. For example, in a square grid, the orthogonal neighbors are given by the four points (1, 0), (0, 1), (-1, 0) and (0, -1). The vector neighbors of (3, 4) in these directions are the points (4, 4), (3, 5), (2, 4) and (3, 3).
See Also