예제 #1
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);
        }