ctac.MapService.GetNeighbors C# (CSharp) 메소드

GetNeighbors() 공개 메소드

public GetNeighbors ( Vector2 center ) : Tile>.Dictionary
center Vector2
리턴 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);
        }