Esempio n. 1
0
        public void set(SpriteBatch.SpriteBatchName mSpriteBatchName, int deltaRefillCount = 1, int prefillCount = 3)
        {
            Debug.Assert(deltaRefillCount > 0);
            Debug.Assert(prefillCount > 0);
            this.name = mSpriteBatchName;
            this.baseManageReserve(deltaRefillCount, prefillCount);

        }
Esempio n. 2
0
        public void set(SpriteBatch.SpriteBatchName mSpriteBatchName, int deltaRefillCount, int prefillCount)
        {
            Debug.Assert(deltaRefillCount > 0);
            Debug.Assert(prefillCount > 0);

            this.spriteBatchName = mSpriteBatchName;
            this.cSBNodeManager.set(mSpriteBatchName, deltaRefillCount, prefillCount);
            this.cSBNodeManager.setSpriteBatch(this);
        }
        //Add a Sprite batch with name, Reserve count and Delta count
        public static SpriteBatch add(SpriteBatch.SpriteBatchName mSpriteBatchName, int deltaRefillCount = 1, int prefillCount = 3)
        {
            // Add a node from reserve list to the active list
            Debug.Assert(sbmInstance != null);
            SpriteBatch nodeAdded = (SpriteBatch)sbmInstance.genericAdd();

            Debug.Assert(nodeAdded != null);
            //set the attributes of the node

            nodeAdded.set(mSpriteBatchName, deltaRefillCount, prefillCount);
            return(nodeAdded);
        }
        public static Font add(Font.FontName fontName, SpriteBatch.SpriteBatchName sbName, String text, Glyph.Name glyphName, float xStart, float yStart, Azul.Color color)
        {
            FontManager fontMInstance = FontManager.getSingletonInstance();
            Font        pNode         = (Font)fontMInstance.genericAdd();

            Debug.Assert(pNode != null);
            pNode.set(fontName, text, glyphName, xStart, yStart, color);
            SpriteBatch spriteBatch = SpriteBatchManager.find(sbName);

            Debug.Assert(spriteBatch != null);
            Debug.Assert(pNode.cFontSprite != null);
            spriteBatch.addToBatch(pNode.cFontSprite);
            return(pNode);
        }
        public static SpriteBatch find(SpriteBatch.SpriteBatchName mSpriteBatchName)
        {
            Debug.Assert(pseudoSpriteBatchRef != null);
            // Wash the PseudoSprite before using it
            pseudoSpriteBatchRef.wash();

            // Set the Name for Find
            pseudoSpriteBatchRef.spriteBatchName = mSpriteBatchName;

            Debug.Assert(sbmInstance != null);

            SpriteBatch targetSpriteBatch = (SpriteBatch)sbmInstance.genericFind(pseudoSpriteBatchRef);

            return(targetSpriteBatch);
        }
Esempio n. 6
0
 public void wash()
 {
     this.spriteBatchName = SpriteBatch.SpriteBatchName.Uninitialized;
 }
Esempio n. 7
0
 public SpriteBatch() : base()
 {
     this.spriteBatchName = SpriteBatchName.Uninitialized;
     this.cSBNodeManager  = new SpriteBatchNodeManager();
 }
Esempio n. 8
0
 public SpriteBatchNodeManager(int deltaRefillCount = 1, int prefillCount = 2)
     : base(deltaRefillCount, prefillCount)
 {
     this.name = SpriteBatch.SpriteBatchName.Uninitialized;
     this.rcSpriteBatch = null;
 }