Пример #1
0
        public static void Draw()
        {
            SpriteBatchMan pMan = SpriteBatchMan.PrivGetInstance();

            Debug.Assert(pMan != null);

            // walk through the list and render
            SpriteBatch pSpriteBatch = (SpriteBatch)pMan.BaseGetActive();

            while (pSpriteBatch != null)
            {
                SBNodeMan pSBNodeMan = pSpriteBatch.GetSBNodeMan();
                Debug.Assert(pSBNodeMan != null);

                if (pSpriteBatch.GetisDraw())
                {
                    pSBNodeMan.Draw();
                }

                pSpriteBatch = (SpriteBatch)pSpriteBatch.pNext;
                //SBNode pNode = (SBNode)pSBNodeMan.BaseGetActive();

                //while (pNode != null)
                //{
                //    // Assumes someone before here called update() on each sprite
                //    // Draw me.
                //    pNode.getSpriteBase().Render();

                //    pNode = (SBNode)pNode.pNext;
                //}

                //pSpriteBatch = (SpriteBatch)pSpriteBatch.pNext;
            }
        }
Пример #2
0
        public static void Draw()
        {
            SpriteBatchMan pMan = SpriteBatchMan.PrivGetInstance();

            Debug.Assert(pMan != null);

            //need access to the Sprites,
            //in the SpriteBatch to render
            SpriteBatch pSBatch = (SpriteBatch)pMan.BaseGetActive();

            while (pSBatch != null)
            {
                if (pSBatch.bToggle == true)
                {
                    SBNodeMan pSBNodeMan = pSBatch.GetSBNodeMan();
                    Debug.Assert(pSBNodeMan != null);

                    pSBNodeMan.Draw();
                }

                pSBatch = (SpriteBatch)pSBatch.pNext;
            }
        }
        public void Draw()
        {
            //SpriteBatchMan pMan = SpriteBatchMan.PrivGetInstance();
            //Debug.Assert(pMan != null);

            // walk through the list and render
            SpriteBatch pSpriteBatch = (SpriteBatch)this.BaseGetActive();

            //int count = 0;
            while (pSpriteBatch != null)
            {
                //count++;
                if (pSpriteBatch.display == true)
                {
                    SBNodeMan pSBNodeMan = pSpriteBatch.GetSBNodeMan();
                    Debug.Assert(pSBNodeMan != null);

                    pSBNodeMan.Draw();
                }
                pSpriteBatch = (SpriteBatch)pSpriteBatch.pNext;
            }
            //Debug.WriteLine("DrawCount:{0}", count);
        }