Пример #1
0
    // Token: 0x060006FA RID: 1786 RVA: 0x000392BC File Offset: 0x000374BC
    public BetterList <string> GetListOfSprites()
    {
        INGUIAtlas replacement = this.replacement;

        if (replacement != null)
        {
            return(replacement.GetListOfSprites());
        }
        if (this.mSprites.Count == 0)
        {
            this.Upgrade();
        }
        BetterList <string> betterList = new BetterList <string>();
        int i     = 0;
        int count = this.mSprites.Count;

        while (i < count)
        {
            UISpriteData uispriteData = this.mSprites[i];
            if (uispriteData != null && !string.IsNullOrEmpty(uispriteData.name))
            {
                betterList.Add(uispriteData.name);
            }
            i++;
        }
        return(betterList);
    }
    // Token: 0x0600066F RID: 1647 RVA: 0x00036B1C File Offset: 0x00034D1C
    public BetterList <string> GetListOfSprites(string match)
    {
        INGUIAtlas replacement = this.replacement;

        if (replacement != null)
        {
            return(replacement.GetListOfSprites(match));
        }
        if (string.IsNullOrEmpty(match))
        {
            return(this.GetListOfSprites());
        }
        BetterList <string> betterList = new BetterList <string>();
        int i     = 0;
        int count = this.mSprites.Count;

        while (i < count)
        {
            UISpriteData uispriteData = this.mSprites[i];
            if (uispriteData != null && !string.IsNullOrEmpty(uispriteData.name) && string.Equals(match, uispriteData.name, StringComparison.OrdinalIgnoreCase))
            {
                betterList.Add(uispriteData.name);
                return(betterList);
            }
            i++;
        }
        string[] array = match.Split(new char[]
        {
            ' '
        }, StringSplitOptions.RemoveEmptyEntries);
        for (int j = 0; j < array.Length; j++)
        {
            array[j] = array[j].ToLower();
        }
        int k      = 0;
        int count2 = this.mSprites.Count;

        while (k < count2)
        {
            UISpriteData uispriteData2 = this.mSprites[k];
            if (uispriteData2 != null && !string.IsNullOrEmpty(uispriteData2.name))
            {
                string text = uispriteData2.name.ToLower();
                int    num  = 0;
                for (int l = 0; l < array.Length; l++)
                {
                    if (text.Contains(array[l]))
                    {
                        num++;
                    }
                }
                if (num == array.Length)
                {
                    betterList.Add(uispriteData2.name);
                }
            }
            k++;
        }
        return(betterList);
    }