Ejemplo n.º 1
0
        public SpriteBaseRef Attach(FontSprite pNode)
        {
            Debug.Assert(this.pSBRefManager != null);
            SpriteBaseRef pSBRef = this.pSBRefManager.Attach(pNode);

            return(pSBRef);
        }
Ejemplo n.º 2
0
        //----------------------------------------------------------------------
        // Methods
        //----------------------------------------------------------------------
        public void Destroy()
        {
            this.BaseDestroy();

            this.name = SpriteBatch.Name.Uninitialized;
            this.pSpriteBaseRefCompare = null;
        }
Ejemplo n.º 3
0
        //----------------------------------------------------------------------
        // Override Abstract methods
        //----------------------------------------------------------------------
        override protected DLink DerivedCreateNode()
        {
            DLink pNode = new SpriteBaseRef();

            Debug.Assert(pNode != null);

            return(pNode);
        }
Ejemplo n.º 4
0
        public SpriteBaseRef Attach(FontSprite pNode)
        {
            SpriteBaseRef pSBNode = (SpriteBaseRef)this.BaseAdd();

            Debug.Assert(pSBNode != null);

            // Initialize SpriteBaseRef
            pSBNode.Set(pNode);

            return(pSBNode);
        }
Ejemplo n.º 5
0
        public SpriteBaseRef Attach(SpriteBox.Name name)
        {
            SpriteBaseRef pNode = (SpriteBaseRef)this.BaseAdd();

            Debug.Assert(pNode != null);

            // Initialize SpriteBase Node
            pNode.Set(name);

            return(pNode);
        }
Ejemplo n.º 6
0
        public void Draw()
        {
            // walk through the list and render
            SpriteBaseRef pNode = (SpriteBaseRef)this.BaseGetActive();

            while (pNode != null)
            {
                // Assumes update() has been called on each sprite
                pNode.GetSpriteBase().Render();

                pNode = (SpriteBaseRef)pNode.GetNext();
            }
        }
Ejemplo n.º 7
0
        override protected Boolean DerivedCompare(DLink pLinkA, DLink pLinkB)
        {
            // This is used in baseFind()
            Debug.Assert(pLinkA != null);
            Debug.Assert(pLinkB != null);

            SpriteBaseRef pDataA = (SpriteBaseRef)pLinkA;
            SpriteBaseRef pDataB = (SpriteBaseRef)pLinkB;

            Boolean status = false;

            // TODO Add Comparison Functionality
            if (pDataB.GetSpriteBase().GetHashCode() == pDataA.GetSpriteBase().GetHashCode())
            {
                status = true;
            }
            else
            {
                status = false;
            }

            return(status);
        }
Ejemplo n.º 8
0
        override protected void DerivedDestroyNode(DLink pLink)
        {
            SpriteBaseRef pSpriteBaseRef = (SpriteBaseRef)pLink;

            pSpriteBaseRef.SetSpriteBase(null);
        }
Ejemplo n.º 9
0
 public void Remove(SpriteBaseRef pNode)
 {
     Debug.Assert(pNode != null);
     this.BaseRemove(pNode);
 }
Ejemplo n.º 10
0
 public SpriteBaseRefManager(int reserveNum = 3, int reserveGrow = 1)
     : base(reserveNum, reserveGrow)
 {
     // initialize derived data here
     this.pSpriteBaseRefCompare = new SpriteBaseRef();
 }
Ejemplo n.º 11
0
        public SpriteBaseRef Attach(SpriteBox.Name name)
        {
            SpriteBaseRef pNode = this.pSBRefManager.Attach(name);

            return(pNode);
        }