Пример #1
0
        static public ColPair GetActiveColPair()
        {
            // get the singleton
            ColPairManager pMan = ColPairManager.privGetInstance();

            return(pMan.pActiveColPair);
        }
Пример #2
0
        public static void Destroy()
        {
            // Get the instance
            ColPairManager pMan = ColPairManager.privGetInstance();

            #if (TRACK_DESTRUCTOR)
            Debug.WriteLine("--->ColPairManager.Destroy()");
            #endif
            pMan.baseDestroy();
        }
Пример #3
0
        public static ColPair Find(ColPair.Name name, int index = 0)
        {
            //get the singleton
            ColPairManager pMan = ColPairManager.privGetInstance();

            // Compare functions only compares two Nodes
            pMan.pRefNode.SetName(name);

            ColPair pData = (ColPair)pMan.baseFindNode(pMan.pRefNode);

            return(pData);
        }
Пример #4
0
        public static ColPair Add(ColPair.Name colpairName, int index, GameObject treeRootA, GameObject treeRootB)
        {
            // Get the instance
            ColPairManager pMan = ColPairManager.privGetInstance();

            // Go to Man, get a node from reserve, add to active, return it
            ColPair pColPair = (ColPair)pMan.baseAddToFront();

            Debug.Assert(pColPair != null);

            // Initialize Image
            pColPair.Set(colpairName, index, treeRootA, treeRootB);

            return(pColPair);
        }
Пример #5
0
        public static void Process()
        {
            // get the singleton
            ColPairManager pMan = ColPairManager.privGetInstance();

            ColPair pColPair = (ColPair)pMan.baseGetActive();

            while (pColPair != null)
            {
                pMan.pActiveColPair = pColPair;

                // do the check for a single pair
                pColPair.Process();

                // advance to next
                pColPair = (ColPair)pColPair.pMNext;
            }
        }