Ejemplo n.º 1
0
        public static void Destory()
        {
            // ensure call Create() first
            CollisionPairMan pMan = CollisionPairMan.GetInstance();

            Debug.Assert(pMan != null);

            // to do...
        }
Ejemplo n.º 2
0
        public static CollisionPair GetActiveColPair()
        {
            // ensure call Create() first
            CollisionPairMan pMan = CollisionPairMan.GetInstance();

            Debug.Assert(pMan != null);

            return(pMan.pActiveColPair);
        }
Ejemplo n.º 3
0
        public static void Remove(CollisionPair pNode)
        {
            // ensure call Create() first
            CollisionPairMan pMan = CollisionPairMan.GetInstance();

            Debug.Assert(pMan != null);

            Debug.Assert(pNode != null);
            pMan.baseRemove(pNode);
        }
Ejemplo n.º 4
0
        public static CollisionPair Find(CollisionPair.Name name)
        {
            // ensure call Create() first
            CollisionPairMan pMan = CollisionPairMan.GetInstance();

            Debug.Assert(pMan != null);

            pMan.poNodeForCompare.setName(name);

            CollisionPair pData = (CollisionPair)pMan.baseFind(pMan.poNodeForCompare);

            return(pData);
        }
Ejemplo n.º 5
0
        public static CollisionPair Add(CollisionPair.Name colPairName, GameObject pTreeRootA, GameObject pTreeRootB)
        {
            // ensure call Create() first
            CollisionPairMan pMan = CollisionPairMan.GetInstance();

            Debug.Assert(pMan != null);

            CollisionPair pColPair = (CollisionPair)pMan.baseAdd();

            Debug.Assert(pColPair != null);

            // initialize collision pair
            pColPair.set(colPairName, pTreeRootA, pTreeRootB);

            return(pColPair);
        }
Ejemplo n.º 6
0
        public static void Reset()
        {
            // ensure call Create() first
            CollisionPairMan pMan = CollisionPairMan.GetInstance();

            Debug.Assert(pMan != null);

            CollisionPair pCollisionPair = (CollisionPair)pMan.pActive;

            while (pCollisionPair != null)
            {
                pCollisionPair.deepClean();
                pCollisionPair = (CollisionPair)pCollisionPair.pNext;
            }

            pMan.baseSetActiveHead(null);
        }
Ejemplo n.º 7
0
        public static void Process()
        {
            // ensure call Create() first
            CollisionPairMan pMan = CollisionPairMan.GetInstance();

            Debug.Assert(pMan != null);

            CollisionPair pColPair = (CollisionPair)pMan.baseGetActiveList();

            while (pColPair != null)
            {
                // set the current active collision pair
                pMan.pActiveColPair = pColPair;

                // cheak collision pair
                pColPair.process();

                // go to next collision pair
                pColPair = (CollisionPair)pColPair.pNext;
            }
        }