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);
        }
Beispiel #2
0
        public static Font Add(Font.Name name, SpriteBatch.Name SB_Name, String pMessage, Glyph.Name glyphName, float xStart, float yStart)
        {
            FontMan pMan = FontMan.GetInstance();

            Font pNode = (Font)pMan.baseAdd();

            Debug.Assert(pNode != null);

            pNode.set(name, pMessage, glyphName, xStart, yStart);

            // Add to sprite batch
            SpriteBatch pSB = SpriteBatchMan.Find(SB_Name);

            Debug.Assert(pSB != null);
            Debug.Assert(pNode.pFontSprite != null);
            pSB.attach(pNode.pFontSprite);

            return(pNode);
        }