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

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

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

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

            return(pNode);
        }
Exemplo n.º 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);
        }
Exemplo n.º 7
0
        public SpriteBatchNode AddSpriteBatchNode(SpriteBase sprt)
        {
            SpriteBatchNode ret = (SpriteBatchNode)this.PullFromReserved();

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

            Debug.Assert(sbNode != null);

            sbNode.Set(pSpriteBase, this);
        }
Exemplo n.º 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;
        }
Exemplo n.º 10
0
        public SpriteBatchNode add(SpriteBase mSpriteBase)
        {
            SpriteBatchNode nodeAdded = (SpriteBatchNode)this.genericAdd();

            Debug.Assert(nodeAdded != null);

            nodeAdded.setSpriteBase(mSpriteBase,this);

            return nodeAdded;
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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;
        }
Exemplo n.º 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;
        }
Exemplo n.º 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);
        }
Exemplo n.º 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;
        }
Exemplo n.º 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);
        }
Exemplo n.º 18
0
        public SpriteNode Attach(SpriteBase pBase)
        {
            SpriteNode pNode = (SpriteNode)this.baseAdd();

            Debug.Assert(pNode != null);

            // Initialize SpriteBatchNode
            pNode.Set(pBase);

            return(pNode);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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;
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 25
0
        //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);
        }
Exemplo n.º 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;
        }
Exemplo n.º 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;
        }
Exemplo n.º 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;
        }
Exemplo n.º 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;
        }
Exemplo n.º 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);
        }