Ejemplo n.º 1
0
        public void Detach(SpriteBase pBase)
        {
            SpriteNode        pNode         = pBase.GetBackSpriteNode();
            SpriteNodeManager pMySBNManager = this.GetSpriteNodeManager();

            pMySBNManager.Remove(pNode);
        }
        public static void Remove(SpriteNode pSpriteBatchNode)
        {
            Debug.Assert(pSpriteBatchNode != null);
            SpriteNodeManager pSpriteNodeMan = pSpriteBatchNode.GetSBNodeManager();

            Debug.Assert(pSpriteNodeMan != null);
            pSpriteNodeMan.Remove(pSpriteBatchNode);
        }
Ejemplo n.º 3
0
        //----------------------------------------------------------------------------------
        // Constructor
        //----------------------------------------------------------------------------------
        public SpriteNodeBatch() : base()
        {
            //delegates first to construct a DLink, then fills these fields
            this.name                = SpriteNodeBatch.Name.Uninitialized;
            this.bDrawStatus         = true;
            this.poSpriteNodeManager = new SpriteNodeManager();

            Debug.Assert(this.poSpriteNodeManager != null);
        }
        public SpriteBatch()
            : base()
        {
            this.name = SpriteBatch.Name.Uninitialized;
            this.pSpriteNodeManager = new SpriteNodeManager();
            Debug.Assert(this.pSpriteNodeManager != null);

            this.bDraw = true;
        }
        public void Set(SpriteBase pNode, SpriteNodeManager _pSpriteNodeMan)
        {
            Debug.Assert(pNode != null);
            this.pSpriteBase = pNode;

            // Set the back pointer
            // Allows easier deletion in the future
            Debug.Assert(pSpriteBase != null);
            this.pSpriteBase.SetSpriteNode(this);

            Debug.Assert(_pSpriteNodeMan != null);
            this.pBackSpriteNodeMan = _pSpriteNodeMan;
        }
Ejemplo n.º 6
0
        //----------------------------------------------------------------------------------
        // Methods
        //----------------------------------------------------------------------------------

        public void Set(SpriteBase pBase, SpriteNodeManager pSpriteNodeManager)
        {
            Debug.Assert(pBase != null);
            this.pSprite = pBase;

            // Set the back pointer
            // Allows easier deletion in the future
            Debug.Assert(pSprite != null);
            this.pSprite.SetSpriteNode(this);

            Debug.Assert(pSpriteNodeManager != null);
            this.pBackSpriteNodeMan = pSpriteNodeManager;
        }
        public static void Draw()
        {
            SpriteBatchManager pMan = SpriteBatchManager.pActiveSBMan;

            Debug.Assert(pMan != null);

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

            while (pSpriteBatch != null)
            {
                if (pSpriteBatch.GetDrawBool())
                {
                    SpriteNodeManager pSBNodeMan = pSpriteBatch.GetSpriteNodeManager();
                    Debug.Assert(pSBNodeMan != null);

                    // Kick the can
                    pSBNodeMan.Draw();
                }

                pSpriteBatch = (SpriteBatch)pSpriteBatch.pNext;
            }
        }
Ejemplo n.º 8
0
        //----------------------------------------------------------------------------------
        // Constructor
        //----------------------------------------------------------------------------------

        public SpriteNode() : base()
        {
            // delegates to DLink constructor first, then does the following
            this.pSprite            = null;
            this.pBackSpriteNodeMan = null;
        }