UIFont.CheckIfRelated C# (CSharp) Méthode

CheckIfRelated() public static méthode

Helper function that determines whether the two atlases are related.
public static CheckIfRelated ( UIFont, a, UIFont, b ) : bool
a UIFont,
b UIFont,
Résultat bool
    public static bool CheckIfRelated(UIFont a, UIFont b)
    {
        if (a == null || b == null) return false;
        return a == b || a.References(b) || b.References(a);
    }

Usage Example

Exemple #1
0
    public void MarkAsChanged()
    {
        if (this.mReplacement != (UnityEngine.Object)null)
        {
            this.mReplacement.MarkAsChanged();
        }
        this.mSprite = (UISpriteData)null;
        UILabel[] array = NGUITools.FindActive <UILabel>();
        Int32     i     = 0;
        Int32     num   = (Int32)array.Length;

        while (i < num)
        {
            UILabel uilabel = array[i];
            if (uilabel.enabled && NGUITools.GetActive(uilabel.gameObject) && UIFont.CheckIfRelated(this, uilabel.bitmapFont))
            {
                UIFont bitmapFont = uilabel.bitmapFont;
                uilabel.bitmapFont = (UIFont)null;
                uilabel.bitmapFont = bitmapFont;
            }
            i++;
        }
        Int32 j     = 0;
        Int32 count = this.symbols.Count;

        while (j < count)
        {
            this.symbols[j].MarkAsChanged();
            j++;
        }
    }
All Usage Examples Of UIFont::CheckIfRelated