Пример #1
0
        /// <summary>
        /// 获取所有的gameplay tag
        /// 如果你只添加了a.b.c那么其实会有3个tag--a, a.b, a.b.c
        /// </summary>
        public void RequestAllGameplayTags(CGameplayTagContainer TagContainer, bool OnlyIncludeDictionaryTags)
        {
            foreach (KeyValuePair <string, CGameplayTagNode> item in GameplayTagNodeMap)
            {
                if (OnlyIncludeDictionaryTags)
                {
                    continue;
                }

                var tag = item.Value.GetCompleteTag();
                TagContainer.AddTagFast(tag);
            }
        }
Пример #2
0
        /**
         *返回一个新的container, 这个container包含的gameplaytag满足是本tag和OtherContainer的精确交集
         */
        public CGameplayTagContainer FilterExact(CGameplayTagContainer OtherContainer)
        {
            CGameplayTagContainer container = new CGameplayTagContainer();

            foreach (CGameplayTag tag in GameplayTags)
            {
                if (tag.MatchesAnyExact(OtherContainer))
                {
                    container.AddTagFast(tag);
                }
            }

            return(container);
        }