Пример #1
0
        int GetForefrontCanvasIndex(IReadOnlyList <IBackgroundUiCanvas> uiCanvasList, FixedHashSet <IBackgroundUiCanvas> entried)
        {
            for (int i = uiCanvasList.Count - 1; i >= 0; i--)
            {
                if (entried.Contains(uiCanvasList[i]))
                {
                    return(i);
                }
            }

            return(-1);
        }
        bool HasTag(AssetEntryRecordCandidate candidate, BranchTagCondition condition)
        {
            FixedHashSet <string> candidateTags = candidate.TagsDictionary.GetValue(this.Id);

            if (candidateTags.IsNull)
            {
                return(false);
            }

            if (condition.Tag.IsNullOrEmpty())
            {
                return(candidateTags.Count <= 0);
            }

            return(candidateTags.Contains(condition.Tag));
        }
Пример #3
0
        public void PrepareTagSets(AssetBundleTableCondition tableCondition)
        {
            this.TagsDictionary.Clear();

            foreach (TagConditionSet tabConditionSet in tableCondition.TagConditionSets)
            {
                IEnumerable <string> containedTags = tabConditionSet.UsingTags.Where(t => tags.Contains(t));

                this.TagsDictionary.Add(
                    tabConditionSet.Id,
                    new FixedHashSet <string>(containedTags));
            }
        }