예제 #1
0
        public SpriteBatch()
            : base()
        {
            this.name = SpriteBatch.Name.Uninitialized;
            this.draw = true;

            this.pSBRefManager = new SpriteBaseRefManager();
            Debug.Assert(this.pSBRefManager != null);
        }
예제 #2
0
        public void Draw()
        {
            // walk through the list and render
            SpriteBatch pSpriteBatch = (SpriteBatch)BaseGetActive();

            while (pSpriteBatch != null)
            {
                if (pSpriteBatch.GetDraw())
                {
                    SpriteBaseRefManager pSpriteBaseRefManager = pSpriteBatch.GetSpriteBaseRefManager();
                    Debug.Assert(pSpriteBaseRefManager != null);

                    // Assumes that update() has been called on each sprite
                    pSpriteBaseRefManager.Draw();
                }

                pSpriteBatch = (SpriteBatch)pSpriteBatch.GetNext();
            }
        }