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

            pMySBNManager.Remove(pNode);
        }
Example #2
0
 public ProxyLetterSprite(SpriteType name, Image image, Sprite realSprite)
     : base(name)
 {
     this.realSprite = realSprite;
     this.image      = image;
     setScale(1, 1);
 }
Example #3
0
        public SpriteBaseNode Add(SpriteBase baseSprite)
        {
            SpriteBaseNode item = new SpriteBaseNode(baseSprite);

            AddToFront(item);
            return(item);
        }
Example #4
0
        public SpriteBaseNode Find(SpriteBase spBase)
        {
            compareItem.SpriteItem = spBase;
            SpriteBaseNode resultItem = (SpriteBaseNode)BaseFind(compareItem);

            return(resultItem);
        }
Example #5
0
        public SpriteNode Attach(SpriteBase pBase)
        {
            Debug.Assert(this.pNodeMan != null);
            SpriteNode pNode = this.pNodeMan.Attach(pBase);

            return(pNode);
        }
Example #6
0
        // Add method for all the types of SpriteBatchNode

        public SpriteBatchNode addToBatch(SpriteBase mSpriteBase)
        {
            // get the SpriteBaseNode from the reserve list to the active list
            SpriteBatchNode spriteGameNode = (SpriteBatchNode)this.cSBNodeManager.add(mSpriteBase);

            Debug.Assert(spriteGameNode != null);
            return(spriteGameNode);
        }
        public SpriteBatchNode AddSpriteBatchNode(SpriteBase sprt)
        {
            SpriteBatchNode ret = (SpriteBatchNode)this.PullFromReserved();

            ret.pSprite = sprt;
            this.Add(ret);
            return(ret);
        }
Example #8
0
        public void Attach(SpriteBase pSpriteBase)
        {
            Debug.Assert(pSpriteBase != null);
            SpriteBatchNode sbNode = (SpriteBatchNode)this.BaseAdd();

            Debug.Assert(sbNode != null);

            sbNode.Set(pSpriteBase, this);
        }
Example #9
0
        public void Set(SpriteBase pNode, SBNodeManager pSBNodeMan)
        {
            Debug.Assert(pNode != null);
            Debug.Assert(pSBNodeMan != null);

            this.pSpriteBase = pNode;
            this.pSpriteBase.SetBackToSBNode(this);
            this.pBackToSBNodeManager = pSBNodeMan;
        }
Example #10
0
        public SpriteBatchNode add(SpriteBase mSpriteBase)
        {
            SpriteBatchNode nodeAdded = (SpriteBatchNode)this.genericAdd();

            Debug.Assert(nodeAdded != null);

            nodeAdded.setSpriteBase(mSpriteBase,this);

            return nodeAdded;
        }
Example #11
0
        public void Dettach(SpriteBase pNodeToRemove)
        {
            //use the back pointers
            Debug.Assert(pNodeToRemove != null);
            SBNode pSBNode = pNodeToRemove.GetSBNode();

            SBNodeMan pSBNodeMan = this.GetSBNodeMan();

            pSBNodeMan.Remove(pSBNode);
        }
Example #12
0
        public SBNode Attach(SpriteBase pNode)
        {
            Debug.Assert(pNode != null);
            SBNode pSBNode = (SBNode)this.BaseAdd();

            Debug.Assert(pSBNode != null);

            pSBNode.Set(pNode, this);
            return(pSBNode);
        }
Example #13
0
        public void Set(SpriteBase pNode, SpriteNodeMan _pSpriteNodeMan)
        {
            this.pSpriteBase = pNode;

            // Set the back pointer
            // Allows easier deletion in the future
            this.pSpriteBase.SetSpriteNode(this);

            this.pBackSpriteNodeMan = _pSpriteNodeMan;
        }
Example #14
0
        public void setSprite(Sprite.SpriteName mSpriteName, SpriteBatchNodeManager mSbManager)
        {
            Sprite sprite = (Sprite)SpriteManager.find(mSpriteName);

            Debug.Assert(sprite != null);
            Debug.Assert(mSbManager != null);

            this.cSpriteBase = sprite;
            this.cSBNodeMan  = mSbManager;
        }
Example #15
0
        public void setSpriteBase(SpriteBase mSpriteBase, SpriteBatchNodeManager mSbManager)
        {
            Debug.Assert(mSpriteBase != null);
            Debug.Assert(mSbManager != null);

            this.cSpriteBase = mSpriteBase;
            this.cSBNodeMan  = mSbManager;

            cSpriteBase.setSpriteBatchNode(this);
        }
Example #16
0
        public void setSpriteBox(SpriteBox.SpriteBoxName spriteBox, SpriteBatchNodeManager mSbManager)
        {
            SpriteBox sprBox = (SpriteBox)SpriteBoxManager.find(spriteBox);

            Debug.Assert(sprBox != null);
            Debug.Assert(mSbManager != null);

            this.cSpriteBase = sprBox;
            this.cSBNodeMan  = mSbManager;
        }
Example #17
0
        public void attach(SpriteBase pNode)
        {
            Debug.Assert(pNode != null);

            SBNode pSBNode = this.poSBNodeMan.attach(pNode);

            Debug.Assert(pSBNode != null);

            // initialize SpriteBatchNode
            pSBNode.set(pNode, this.poSBNodeMan);
        }
Example #18
0
        public SpriteNode Attach(SpriteBase pBase)
        {
            SpriteNode pNode = (SpriteNode)this.baseAdd();

            Debug.Assert(pNode != null);

            // Initialize SpriteBatchNode
            pNode.Set(pBase);

            return(pNode);
        }
Example #19
0
        public SBNode Attach(SpriteBase pNode)
        {
            Debug.Assert(pNode != null);
            SBNode pSBNode = this.poSBNodeMan.Attach(pNode);

            pSBNode.Set(pNode, this.poSBNodeMan);

            // Back pointer
            // this.poSBNodeMan.SetBackToSpriteBatch(this);
            return(pSBNode);
        }
Example #20
0
        public SBNode Attach(SpriteBase pNode)
        {
            SBNode pSBNode = (SBNode)this.BaseAdd();

            Debug.Assert(pSBNode != null);

            //intialize and set back pointer
            pSBNode.Set(pNode, this);

            return(pSBNode);
        }
Example #21
0
        //---------------------------------------------------------------------------------------------------------
        // Methods
        //---------------------------------------------------------------------------------------------------------
        public void set(SpriteBase pNode, SBNodeMan pSBNodeMan)
        {
            Debug.Assert(pNode != null);
            this.pSpriteBase = pNode;

            // set back pointer, easy for deletion
            Debug.Assert(this.pSpriteBase != null);
            this.pSpriteBase.SetSBNode(this);

            Debug.Assert(pSBNodeMan != null);
            this.pBackSBNodeMan = pSBNodeMan;
        }
Example #22
0
        public void Attach(SpriteBase pNode)
        {
            Debug.Assert(pNode != null);

            // Go to Man, get a node from reserve, add to active, return it
            SBNode pSBNode = (SBNode)this.pSBNodeMan.Add(pNode);

            Debug.Assert(pSBNode != null);

            // Initialize SpriteBatchNode
            pSBNode.Set(pNode, this.pSBNodeMan);
        }
Example #23
0
        public void Attach(SpriteBase pNode)
        {
            Debug.Assert(pNode != null);

            SBNode pSBNode = (SBNode)this.poSBNodeMan.Attach(pNode);

            Debug.Assert(pSBNode != null);

            pSBNode.Set(pNode, this.poSBNodeMan);

            this.poSBNodeMan.SetSpriteBatch(this);
        }
Example #24
0
        public SBNode attach(SpriteBase pNode)
        {
            // get a node from reserve, add to active, return it
            SBNode pSBNode = (SBNode)this.baseAdd();

            Debug.Assert(pSBNode != null);

            // initialize SpriteBatchNode
            pSBNode.set(pNode, this);

            return(pSBNode);
        }
        //public SBNode Attach(GameSprite.Name name)
        //{
        //    SBNode pNode = (SBNode)this.BaseAdd();
        //    Debug.Assert(pNode != null);

        //    // Initialize SpriteBatchNode
        //    pNode.Set(name);

        //    return pNode;
        //}
        //public SBNode Attach(BoxSprite.Name name)
        //{

        //    SBNode pNode = (SBNode)this.BaseAdd();
        //    Debug.Assert(pNode != null);

        //    // Initialize SpriteBatchNode
        //    pNode.Set(name);

        //    return pNode;
        //}

        //public SBNode Attach(ProxySprite pNode)
        //{
        //    // Go to Man, get a node from reserve, add to active, return it
        //    SBNode pSBNode = (SBNode)this.BaseAdd();
        //    Debug.Assert(pSBNode != null);

        //    // Initialize SpriteBatchNode
        //    pSBNode.Set(pNode);

        //    return pSBNode;
        //}


        public SBNode Attach(SpriteBase pNode)
        {
            // Go to Man, get a node from reserve, add to active, return it
            SBNode pSBNode = (SBNode)this.BaseAdd();

            Debug.Assert(pSBNode != null);

            // Initialize SpriteBatchNode
            pSBNode.Set(pNode, this);

            return(pSBNode);
        }
Example #26
0
        public void Set(SpriteBase pNode, SBNodeMan pInSBNodeMan)
        {
            Debug.Assert(pNode != null);
            this.pSpriteBase = pNode;

            //set back pointers
            Debug.Assert(pSpriteBase != null);
            this.pSpriteBase.SetSBNode(this);

            Debug.Assert(pInSBNodeMan != null);
            this.pBackSBNodeMan = pInSBNodeMan;
        }
Example #27
0
        public void Set(SpriteBase pNode, SpriteBaseNodeManager pSBNodeMan)
        {
            // associate it
            Debug.Assert(pNode != null);
            this.pSpriteBase = pNode;

            // Set the back pointer
            // Allows easier deletion in the future
            this.pSpriteBase.SetSBNode(this);

            Debug.Assert(pSBNodeMan != null);
            this.pBackSBNodeMan = pSBNodeMan;
        }
Example #28
0
        public void Set(SpriteBase pNode, SpriteNodeMan _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;
        }
Example #29
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;
        }
Example #30
0
        //public void Detach(SpriteBase pNode)
        //{
        //    Debug.Assert(pNode != null);
        //    SBNode pSBNode = this.Find(pNode);
        //    //if(pSBNode == null)
        //    //{
        //    //    Debug.Assert(true);
        //    //}
        //    this.BaseRemove(pSBNode);

        //}

        public void Detach(SpriteBase pSB)
        {
            Debug.Assert(pSB != null);
            SBNode pSBNode = pSB.GetBackToSBNode();

            pSB.pBackToSBNode = null;

            SBNodeManager pMan = pSBNode.GetBackToSBNodeManager();

            pSBNode.pBackToSBNodeManager = null;

            pMan.Remove(pSBNode);
            //this.poSBNodeMan.Detach(pNode);
        }