public SBNode(batchEnum _name, SpriteSortMode _sort, BlendState _blend) { spriteBatch = new SpriteBatch(Game1.GameInstance.GraphicsDevice); batchName = _name; sort = _sort; blend = _blend; spriteListHead = null; }
public void addDisplayObject(DisplayObject _sprite) { Debug.Assert(_sprite != null); SpriteNode node = new SpriteNode(_sprite); if (spriteListHead == null) { spriteListHead = node; node.next = null; node.prev = null; } else { node.next = spriteListHead; spriteListHead.prev = node; spriteListHead = node; } }
protected virtual void Initialize() { this.next = null; this.prev = null; }
protected virtual void Initialize() { this.next = null; this.prev = null; }
public void removeDisplayObject(DisplayObject _sprite) { SpriteNode node = findSpriteNode(_sprite); if (node.prev != null) { // middle or last node node.prev.next = node.next; } else { // first spriteListHead = node.next; } if (node.next != null) { // middle node node.next.prev = node.prev; } }