public void DeactivateCollisionSprite() { SpriteBatchNode sbNode = this.pCollisionObject.pCollisionSpriteBox.GetSpriteBatchNode(); Debug.Assert(sbNode != null); SpriteBatchManager.Remove(sbNode); }
protected override MLink createDerivedClassNode() { MLink mNode = new SpriteBatchNode(); Debug.Assert(mNode != null); return mNode; }
protected override void DumpNode(CLink node) { SpriteBatchNode spNode = (SpriteBatchNode)node; Debug.WriteLine(String.Format("\t\tSpriteBatchNode:({0})", spNode.GetHashCode())); Debug.WriteLine(String.Format("\t\tstatus:{0}", spNode.status)); }
public void RecycleAllActive() { SpriteBatchNode current = (SpriteBatchNode)this.poActiveHead; SpriteBatchNode pOld; while (current != null) { if (current.pSprite.pGameObject != null) { GameObjectManager.getInstance().Remove(current.pSprite.pGameObject.Wash()); } if (current.pSprite.GetType() == typeof(GameSprite)) { GameSpriteManager.getInstance().Remove(current.pSprite.Wash()); } else if (current.pSprite.GetType() == typeof(BoxSprite)) { BoxSpriteManager.getInstance().Remove(current.pSprite.Wash()); } pOld = current; current = (SpriteBatchNode)current.pNext; this.Remove(pOld); } }
public virtual void RemoveSprite() { Debug.Assert(this.pProxySprite != null); SpriteBatchNode sbNode = this.pProxySprite.GetSpriteBatchNode(); Debug.Assert(sbNode != null); SpriteBatchManager.Remove(sbNode); }
public static void Remove(SpriteBatchNode spriteBatchNode) { Debug.Assert(spriteBatchNode != null); SpriteBatch sb = spriteBatchNode.GetSpriteBatch(); Debug.Assert(sb != null); sb.Remove(spriteBatchNode); }
// 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); }
public SpriteBatchNode AddSpriteBatchNode(SpriteBase sprt) { SpriteBatchNode ret = (SpriteBatchNode)this.PullFromReserved(); ret.pSprite = sprt; this.Add(ret); return(ret); }
public void Attach(SpriteBase pSpriteBase) { Debug.Assert(pSpriteBase != null); SpriteBatchNode sbNode = (SpriteBatchNode)this.BaseAdd(); Debug.Assert(sbNode != null); sbNode.Set(pSpriteBase, this); }
public static void remove(SpriteBatchNode targetNode) { Debug.Assert(sbmInstance != null); Debug.Assert(targetNode != null); SpriteBatchNodeManager sbnMan = targetNode.getSpriteBatchNodeMan(); Debug.Assert(sbnMan != null); sbnMan.remove(targetNode); }
public void draw() { SpriteBatchNode mSpriteBatchNode = (SpriteBatchNode)cSBNodeManager.activeList; while (mSpriteBatchNode != null) { mSpriteBatchNode.cSpriteBase.render(); mSpriteBatchNode = (SpriteBatchNode)mSpriteBatchNode.pNext; } }
public SpriteBatchNode add(SpriteBox.SpriteBoxName mSpriteBoxName) { SpriteBatchNode nodeAdded = (SpriteBatchNode)this.genericAdd(); Debug.Assert(nodeAdded != null); nodeAdded.setSpriteBox(mSpriteBoxName, this); return nodeAdded; }
public BombRoot(GameObjectName goName, SpriteBaseName sName, float x, float y, int idx) : base(goName, sName, BombType.BombRoot, idx) { this.x = x; this.y = y; SpriteBatch sb = new SpriteBatch(); SpriteBatchNode sbNode = new SpriteBatchNode(); sbNode.Set(SpriteManager.Find(SpriteBaseName.Null), sb); this.pProxySprite.SetSpriteBatchNode(sbNode); this.pCollisionObject.pCollisionSpriteBox.pLineColor = ColorFactory.Create(ColorName.White).pAzulColor; }
public void removeFromSpriteBatch() { SpriteBatchNode sbNode = cProxySprite.getSpriteBatchBNode(); Debug.Assert(sbNode != null); SpriteBatchManager.remove(sbNode); ///3 lines commented for ghost Manager sbNode = this.cCollisionObj.cSpriteBox.getSpriteBatchBNode(); Debug.Assert(sbNode != null); SpriteBatchManager.remove(sbNode); GhostManager.add(this); }
public void RenderAllActive() { SpriteBatchNode current = (SpriteBatchNode)this.poActiveHead; while (current != null) { if (current.pSprite.pGameObject != null) { current.pSprite.pGameObject.Render(); } else { current.pSprite.Render(); } current = (SpriteBatchNode)current.pNext; } }
// Add given number of Nodes into an empty Reserved List. // Called when constructing manager or growing the size public override void CreateReservedNodes(int numofNodes) { DLink tmpNode = new SpriteBatchNode(); this.poReservedHead = tmpNode; int cnt = 1; while (cnt < numofNodes) { tmpNode.pNext = new SpriteBatchNode(); tmpNode.pNext.pPrev = tmpNode; tmpNode = tmpNode.pNext; cnt++; } this.mNumReserved = numofNodes; }
public virtual void Remove() { Debug.Assert(this.pProxySprite != null); SpriteBatchNode sbNode = this.pProxySprite.GetSpriteBatchNode(); Debug.Assert(sbNode != null); SpriteBatchManager.Remove(sbNode); if (GameManager.GetCollisionBoxes()) { if (this.pCollisionObject.pCollisionSpriteBox.pSpriteBatchNode != null) { sbNode = this.pCollisionObject.pCollisionSpriteBox.GetSpriteBatchNode(); Debug.Assert(sbNode != null); SpriteBatchManager.Remove(sbNode); } } GameObjectManager.Remove(this); }
public static void Draw() { SpriteBatchManager sbMan = SpriteBatchManager.GetInstance(); SpriteBatch pSpriteBatchActive = (SpriteBatch)sbMan.pActive; SpriteBatchNode sbNode = null; while (pSpriteBatchActive != null) { sbNode = (SpriteBatchNode)pSpriteBatchActive.pActive; while (sbNode != null) { if (sbNode.pSpriteBase != null) { sbNode.pSpriteBase.Render(); } sbNode = (SpriteBatchNode)sbNode.pCNext; } pSpriteBatchActive = (SpriteBatch)pSpriteBatchActive.pDNext; } }
public void UpdateAllActive() { SpriteBatchNode current = (SpriteBatchNode)this.poActiveHead; while (current != null) { //Debug.Print(current.pSprite.name.ToString()); //Debug.Print("x: " + ((GameSprite)(current.pSprite)).poAzulSprite.x); //Debug.Print("y: " + ((GameSprite)(current.pSprite)).poAzulSprite.y); if (current.pSprite.pGameObject != null) { current.pSprite.pGameObject.Update(); } else { current.pSprite.Update(); } current = (SpriteBatchNode)current.pNext; } }
// Not implemented. Yet to implement public void remove(SpriteBatchNode targetNode) { Debug.Assert(targetNode != null); this.cSBNodeManager.remove(targetNode); }
public override CollectionNode getCollectionObj() { CollectionNode node = new SpriteBatchNode(); return node; }
public void SetSpriteBatchNode(SpriteBatchNode pSpriteBatchNode) { Debug.Assert(pSpriteBatchNode != null); this.pSpriteBatchNode = pSpriteBatchNode; }
protected SpriteBase() { this.pSpriteBatchNode = null; }
public void setSpriteBatchNode(SpriteBatchNode sbNode) { Debug.Assert(sbNode != null); this.spriteBatchNode = sbNode; }
public void Remove(SpriteBatchNode sbNode) { Debug.Assert(sbNode != null); this.BaseRemove(sbNode); }
public SpriteBase() : base() { spriteBatchNode = null; }
public void remove(SpriteBatchNode targetNode) { Debug.Assert(targetNode != null); this.genericRemove(targetNode); }