bool HasAnyTags(AssetEntryRecordCandidate candidate)
        {
            FixedHashSet <string> candidateTags = candidate.TagsDictionary.GetValue(this.Id);

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

            return(candidateTags.Count > 0);
        }
        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));
        }
Ejemplo n.º 3
0
        int GetStep(AssetEntryRecordCandidate candidate)
        {
            int step = int.MaxValue / 2;

            FixedHashSet <string> candidateTags = candidate.TagsDictionary.GetValue(this.Id);

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

            foreach (var tag in candidateTags)
            {
                StepTagCondition condition = conditionDictionary.GetValue(tag);
                if (condition != null)
                {
                    step = Mathf.Min(step, condition.Step);
                }
            }

            return(step);
        }
Ejemplo n.º 4
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);
        }
Ejemplo n.º 5
0
        public AssetEntryRecordCandidate(AssetEntryRecord assetEntryRecord, IEnumerable <string> tags)
        {
            this.AssetEntryRecord = assetEntryRecord;

            this.tags = new FixedHashSet <string>(tags.Distinct());
        }