コード例 #1
0
 public void set(Font.FontName name, String text, Glyph.Name glyphName, float xStart, float yStart, Azul.Color color)
 {
     Debug.Assert(text != null);
     this.text      = text;
     this.x         = xStart;
     this.y         = yStart;
     this.fontName  = name;
     this.glyphName = glyphName;
     Debug.Assert(color != null);
     this.fontColor.Set(color);
 }
コード例 #2
0
        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);
        }
コード例 #3
0
        public static Font find(Font.FontName fontName)
        {
            FontManager fontMInstance = FontManager.getSingletonInstance();

            Debug.Assert(fontMInstance != null);
            Font pseudoFont = cFontRef;

            Debug.Assert(pseudoFont != null);

            pseudoFont.fontName = fontName;

            Font targetFont = (Font)fontMInstance.genericFind(pseudoFont);

            return(targetFont);
        }
コード例 #4
0
ファイル: Font.cs プロジェクト: snehalw22/Space-Invaders-Game
 public void set(Font.FontName name, String text, Glyph.Name glyphName, float xStart, float yStart, Azul.Color color)
 {
     Debug.Assert(text != null);
     this.fontName = name;
     this.cFontSprite.set(name, text, glyphName, xStart, yStart, color);
 }