Пример #1
0
    private void Awake()
    {
#if USE_SHAPER_2D_LIBRARY
        draw2D = new Draw2DShaperImpl();
#else
        draw2D = new Draw2DDummyImpl();
        Debug.LogWarning("The USE_SHAPER_2D_LIBRARY preprocessor flag is not set. You will have NO game-generated 2D graphics! If you want game-generated 2D graphics, see README. If this is intentional, you can also just remove this error message :)");
#endif
        bitmapFont = draw2D.CreateBitmapFont(bitmapFontXml, bitmapFontImage);
        Util.FindIfNotSet(this, ref engine);
        Util.FindIfNotSet(this, ref imageSystem);
        Util.FindIfNotSet(this, ref imageLoader);
    }
Пример #2
0
 public void DrawText(string text, float x, float y, float rotationDegs, float worldSizePixels, Color color, IBitmapFont2D font)
 {
     guiStyle.normal.textColor = color;
     GUI.Label(new Rect(x, y, Screen.width, Screen.height), text, guiStyle);
 }
Пример #3
0
 public void DrawText(string text, float x, float y, float rotationDegs, float worldSizePixels, Color color, IBitmapFont2D font)
 {
     Drawing2D.DrawText(text, x, y, rotationDegs, worldSizePixels, color, ((BitmapFontImpl)font).bitmapFont);
 }