ctac.MapService.GetKingNeighbors C# (CSharp) Method

GetKingNeighbors() public method

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

            return CheckNeighbors(toCheck);
        }