Ejemplo n.º 1
0
        public void PrintNodes()
        {
            DLink pNodeIterator;
            int   nodePos = 0;

            // Print Active List
            Debug.WriteLine("Active List:");

            if (pActive != null)
            {
                Debug.Write("  Node " + nodePos + " - ");
                pActive.Print();
                pNodeIterator = pActive;
                while (pNodeIterator.HasNext())
                {
                    pNodeIterator = pNodeIterator.GetNext();
                    nodePos++;
                    Debug.Write("  Node " + nodePos + " - ");
                    pNodeIterator.Print();
                }
            }
            else
            {
                Debug.WriteLine("  *** Empty ***");
            }

            Debug.WriteLine("");

            // Print Reserve List
            nodePos = 0;
            Debug.WriteLine("Reserve List:");

            if (pReserve != null)
            {
                Debug.Write("  Node " + nodePos + " - ");
                pReserve.Print();
                pNodeIterator = pReserve;
                while (pNodeIterator.HasNext())
                {
                    pNodeIterator = pNodeIterator.GetNext();
                    nodePos++;
                    Debug.Write("  Node " + nodePos + " - ");
                    pNodeIterator.Print();
                }
            }
            else
            {
                Debug.WriteLine("  *** Empty ***");
            }

            Debug.WriteLine("");
        }
Ejemplo n.º 2
0
        public override void Print()
        {
            Debug.WriteLine(" GameObject Name: {0} ({1})", this.GetName(), this.GetHashCode());
            base.Print();

            DLink pNode = pHead;

            while (pNode != null)
            {
                pNode.Print();
                pNode = pNode.GetNext();
            }
        }