コード例 #1
0
        public void Detach(SpriteBase pBase)
        {
            SpriteNode        pNode         = pBase.GetBackSpriteNode();
            SpriteNodeManager pMySBNManager = this.GetSpriteNodeManager();

            pMySBNManager.Remove(pNode);
        }
コード例 #2
0
        public static void Remove(SpriteNode pSpriteBatchNode)
        {
            Debug.Assert(pSpriteBatchNode != null);
            SpriteNodeManager pSpriteNodeMan = pSpriteBatchNode.GetSBNodeManager();

            Debug.Assert(pSpriteNodeMan != null);
            pSpriteNodeMan.Remove(pSpriteBatchNode);
        }
コード例 #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);
        }
コード例 #4
0
        public SpriteBatch()
            : base()
        {
            this.name = SpriteBatch.Name.Uninitialized;
            this.pSpriteNodeManager = new SpriteNodeManager();
            Debug.Assert(this.pSpriteNodeManager != null);

            this.bDraw = true;
        }
コード例 #5
0
        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;
        }
コード例 #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;
        }
コード例 #7
0
        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;
            }
        }
コード例 #8
0
        //----------------------------------------------------------------------------------
        // Constructor
        //----------------------------------------------------------------------------------

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