public SpriteBaseRef Attach(FontSprite pNode) { Debug.Assert(this.pSBRefManager != null); SpriteBaseRef pSBRef = this.pSBRefManager.Attach(pNode); return(pSBRef); }
//---------------------------------------------------------------------- // Methods //---------------------------------------------------------------------- public void Destroy() { this.BaseDestroy(); this.name = SpriteBatch.Name.Uninitialized; this.pSpriteBaseRefCompare = null; }
//---------------------------------------------------------------------- // Override Abstract methods //---------------------------------------------------------------------- override protected DLink DerivedCreateNode() { DLink pNode = new SpriteBaseRef(); Debug.Assert(pNode != null); return(pNode); }
public SpriteBaseRef Attach(FontSprite pNode) { SpriteBaseRef pSBNode = (SpriteBaseRef)this.BaseAdd(); Debug.Assert(pSBNode != null); // Initialize SpriteBaseRef pSBNode.Set(pNode); return(pSBNode); }
public SpriteBaseRef Attach(SpriteBox.Name name) { SpriteBaseRef pNode = (SpriteBaseRef)this.BaseAdd(); Debug.Assert(pNode != null); // Initialize SpriteBase Node pNode.Set(name); return(pNode); }
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(); } }
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); }
override protected void DerivedDestroyNode(DLink pLink) { SpriteBaseRef pSpriteBaseRef = (SpriteBaseRef)pLink; pSpriteBaseRef.SetSpriteBase(null); }
public void Remove(SpriteBaseRef pNode) { Debug.Assert(pNode != null); this.BaseRemove(pNode); }
public SpriteBaseRefManager(int reserveNum = 3, int reserveGrow = 1) : base(reserveNum, reserveGrow) { // initialize derived data here this.pSpriteBaseRefCompare = new SpriteBaseRef(); }
public SpriteBaseRef Attach(SpriteBox.Name name) { SpriteBaseRef pNode = this.pSBRefManager.Attach(name); return(pNode); }