示例#1
0
        // TODO probably remove this method because no longer used. Update handled in game objects
        public static void Update()
        {
            SpriteBatchManager pMan = SpriteBatchManager.PrivGetInstance();

            Debug.Assert(pMan != null);

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

            while (pSpriteBatch != null)
            {
                SpriteBaseNodeManager pSBNodeMan = pSpriteBatch.GetSBNodeManager();
                Debug.Assert(pSBNodeMan != null);

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

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

                    pNode = (SpriteBaseNode)pNode.GetNext();
                }

                pSpriteBatch = (SpriteBatch)pSpriteBatch.GetNext();
            }
        }
示例#2
0
        public void Draw()
        {
            // walk through the list and render
            SpriteBaseNode pNode = (SpriteBaseNode)this.BaseGetActive();

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

                pNode = (SpriteBaseNode)pNode.GetNext();
            }
        }