// TODO probably remove this method because no longer used. Update handled in game objects public static void Update() { SpriteBatchManager pMan = SpriteBatchManager.PrivGetInstance(); Debug.Assert(pMan != null); // walk through the list and render SpriteBatch pSpriteBatch = (SpriteBatch)pMan.BaseGetActive(); while (pSpriteBatch != null) { SpriteBaseNodeManager pSBNodeMan = pSpriteBatch.GetSBNodeManager(); Debug.Assert(pSBNodeMan != null); SpriteBaseNode pNode = (SpriteBaseNode)pSBNodeMan.BaseGetActive(); while (pNode != null) { pNode.pSpriteBase.Update(); pNode = (SpriteBaseNode)pNode.GetNext(); } pSpriteBatch = (SpriteBatch)pSpriteBatch.GetNext(); } }
public SpriteBatch() { this.name = SpriteBatch.Name.Uninitialized; this.poSBNodeMan = new SpriteBaseNodeManager(); Debug.Assert(this.poSBNodeMan != null); this.enabled = true; }
public static void Remove(SpriteBaseNode pSpriteBatchNode) { Debug.Assert(pSpriteBatchNode != null); SpriteBaseNodeManager pSBNodeMan = pSpriteBatchNode.GetSBNodeMan(); Debug.Assert(pSBNodeMan != null); pSBNodeMan.Remove(pSpriteBatchNode); }
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; }
public static void Draw() { SpriteBatchManager pMan = SpriteBatchManager.PrivGetInstance(); Debug.Assert(pMan != null); // walk through the list and render SpriteBatch pSpriteBatch = (SpriteBatch)pMan.BaseGetActive(); while (pSpriteBatch != null) { if (pSpriteBatch.enabled) { SpriteBaseNodeManager pSBNodeMan = pSpriteBatch.GetSBNodeManager(); Debug.Assert(pSBNodeMan != null); pSBNodeMan.Draw(); } pSpriteBatch = (SpriteBatch)pSpriteBatch.GetNext(); } }
public SpriteBaseNode() { this.pSpriteBase = null; this.pBackSBNodeMan = null; }