AStarCollisionMap.QuadTree.Quad.GetDepth C# (CSharp) Méthode

GetDepth() public méthode

Gets the depth of this node in the tree.
public GetDepth ( ) : int
Résultat int
        public int GetDepth()
        {
            Quad quad = this;
            int depth = 0;
            while (quad.parent != null)
            {
                quad = quad.parent;
                depth++;
            }
            return depth;
        }