Пример #1
0
        public List <Vector2> EdgePercentages(string direction)
        {
            if (direction == "A" && Parent != null)
            {
                List <Vector2> A = Parent.FindRecursiveLeft(null);
                List <Vector2> B = Parent.FindRecursiveTop(null);
                A.AddRange(B);
                return(A);
            }

            if (direction == "B" && Parent != null)
            {
                List <Vector2> A = Parent.FindRecursiveRight(null);
                List <Vector2> B = Parent.FindRecursiveTop(null);
                A.AddRange(B);
                return(A);
            }

            if (direction == "C" && Parent != null)
            {
                List <Vector2> A = Parent.FindRecursiveLeft(null);
                List <Vector2> B = Parent.FindRecursiveBottom(null);
                A.AddRange(B);
                return(A);
            }

            if (direction == "D" && Parent != null)
            {
                List <Vector2> A = Parent.FindRecursiveRight(null);
                List <Vector2> B = Parent.FindRecursiveBottom(null);
                A.AddRange(B);
                return(A);
            }

            Debug.LogError("There's an error with your input buddy.");
            return(null);
        }