Example #1
0
        public static void Remove(SpriteBatch pSpriteBatch)
        {
            //ensure call Create() first
            SpriteBatchMan pMan = SpriteBatchMan.GetInstance();

            Debug.Assert(pMan != null);

            Debug.Assert(pSpriteBatch != null);
            pMan.baseRemove(pSpriteBatch);
        }
Example #2
0
        public static void Destory()
        {
            //ensure call Create() first
            SpriteBatchMan pMan = SpriteBatchMan.GetInstance();

            Debug.Assert(pMan != null);

            pMan.baseDestory();

            pMan.poNodeForCompare    = null;
            SpriteBatchMan.pInstance = null;
        }
Example #3
0
        public static SpriteBatch Find(SpriteBatch.Name name)
        {
            //ensure call Create() first
            SpriteBatchMan pMan = SpriteBatchMan.GetInstance();

            Debug.Assert(pMan != null);

            pMan.poNodeForCompare.setName(name);

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

            return(pData);
        }
Example #4
0
        public static SpriteBatch Add(SpriteBatch.Name name, int reserveNum = 3, int numGrow = 1)
        {
            //ensure call Create() first
            SpriteBatchMan pMan = SpriteBatchMan.GetInstance();

            Debug.Assert(pMan != null);

            SpriteBatch pSpriteBatch = (SpriteBatch)pMan.baseAdd();

            Debug.Assert(pSpriteBatch != null);

            pSpriteBatch.set(name, reserveNum, numGrow);
            return(pSpriteBatch);
        }
Example #5
0
        public static void Reset()
        {
            //ensure call Create() first
            SpriteBatchMan pMan = SpriteBatchMan.GetInstance();

            Debug.Assert(pMan != null);

            SpriteBatch pSpriteBatch = (SpriteBatch)pMan.pActive;

            while (pSpriteBatch != null)
            {
                pSpriteBatch.deepClear();
                pSpriteBatch = (SpriteBatch)pSpriteBatch.pNext;
            }

            pMan.baseSetActiveHead(null);
        }
Example #6
0
        public static void Draw()
        {
            //ensure call Create() first
            SpriteBatchMan pMan = SpriteBatchMan.GetInstance();

            Debug.Assert(pMan != null);

            // get the active list
            SpriteBatch pSpriteBatch = (SpriteBatch)pMan.baseGetActiveList();

            // walk through the list and render
            while (pSpriteBatch != null)
            {
                if (pSpriteBatch.getIsDraw())
                {
                    SBNodeMan pSBNodeMan = pSpriteBatch.getSBNodeMan();
                    Debug.Assert(pSBNodeMan != null);

                    pSBNodeMan.draw();
                }

                pSpriteBatch = (SpriteBatch)pSpriteBatch.pNext;
            }
        }