Table of Contents

Method GetVectorNeighbors

Namespace
Gamelogic.Grids2
Assembly
Assembly-CSharp.dll

GetVectorNeighbors(IEnumerable<GridPoint2>)

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

public IEnumerable<GridPoint2> GetVectorNeighbors(IEnumerable<GridPoint2> directions)

Parameters

directions IEnumerable<GridPoint2>

A list of points that represents where the neighbors are.

Returns

IEnumerable<GridPoint2>

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).