ctac.MapService.GetNeighbors C# (CSharp) Method

GetNeighbors() public method

public GetNeighbors ( Vector2 center ) : Tile>.Dictionary
center Vector2
return Tile>.Dictionary
        public Dictionary<Vector2, Tile> GetNeighbors(Vector2 center)
        {
            var toCheck = new Vector2[4]{
                center.AddX(1f),
                center.AddX(-1f),
                center.AddY(1f),
                center.AddY(-1f)
            };

            return CheckNeighbors(toCheck);
        }