XNAInterfaceComponents.Components.Component.GetDepth C# (CSharp) Method

GetDepth() public method

Gets the depth of this component.
public GetDepth ( ) : int
return int
        public virtual int GetDepth()
        {
            if (this.parent == null) return 1;
            else return this.parent.GetDepth() + 1;
        }