Exemplo n.º 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;
            }
        }
Exemplo n.º 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;
            }
        }
Exemplo n.º 3
0
        public static void Update()
        {
            SpriteBatchMan pMan = SpriteBatchMan.PrivGetInstance();

            Debug.Assert(pMan != null);
            SpriteBatch pSpriteBatch = (SpriteBatch)pMan.BaseGetActive();

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

                SBNode pNode = (SBNode)pSBNodeMan.BaseGetActive();

                while (pNode != null)
                {
                    pNode.GetSpriteBase().Update();

                    pNode = (SBNode)pNode.pNext;
                }

                pSpriteBatch = (SpriteBatch)pSpriteBatch.pNext;
            }
        }