public static void Remove(SpriteBatch pSpriteBatch) { //ensure call Create() first SpriteBatchMan pMan = SpriteBatchMan.GetInstance(); Debug.Assert(pMan != null); Debug.Assert(pSpriteBatch != null); pMan.baseRemove(pSpriteBatch); }
public static void Destory() { //ensure call Create() first SpriteBatchMan pMan = SpriteBatchMan.GetInstance(); Debug.Assert(pMan != null); pMan.baseDestory(); pMan.poNodeForCompare = null; SpriteBatchMan.pInstance = null; }
public static SpriteBatch Find(SpriteBatch.Name name) { //ensure call Create() first SpriteBatchMan pMan = SpriteBatchMan.GetInstance(); Debug.Assert(pMan != null); pMan.poNodeForCompare.setName(name); SpriteBatch pData = (SpriteBatch)pMan.baseFind(pMan.poNodeForCompare); return(pData); }
public static SpriteBatch Add(SpriteBatch.Name name, int reserveNum = 3, int numGrow = 1) { //ensure call Create() first SpriteBatchMan pMan = SpriteBatchMan.GetInstance(); Debug.Assert(pMan != null); SpriteBatch pSpriteBatch = (SpriteBatch)pMan.baseAdd(); Debug.Assert(pSpriteBatch != null); pSpriteBatch.set(name, reserveNum, numGrow); return(pSpriteBatch); }
public static void Reset() { //ensure call Create() first SpriteBatchMan pMan = SpriteBatchMan.GetInstance(); Debug.Assert(pMan != null); SpriteBatch pSpriteBatch = (SpriteBatch)pMan.pActive; while (pSpriteBatch != null) { pSpriteBatch.deepClear(); pSpriteBatch = (SpriteBatch)pSpriteBatch.pNext; } pMan.baseSetActiveHead(null); }
public static void Draw() { //ensure call Create() first SpriteBatchMan pMan = SpriteBatchMan.GetInstance(); Debug.Assert(pMan != null); // get the active list SpriteBatch pSpriteBatch = (SpriteBatch)pMan.baseGetActiveList(); // walk through the list and render while (pSpriteBatch != null) { if (pSpriteBatch.getIsDraw()) { SBNodeMan pSBNodeMan = pSpriteBatch.getSBNodeMan(); Debug.Assert(pSBNodeMan != null); pSBNodeMan.draw(); } pSpriteBatch = (SpriteBatch)pSpriteBatch.pNext; } }