Example #1
0
 /// <summary>
 /// 创建分组字典缓存
 /// </summary>
 /// <typeparam name="groupKeyType"></typeparam>
 /// <typeparam name="keyType"></typeparam>
 /// <param name="getGroupKey">分组关键字获取器</param>
 /// <param name="getKey">字典关键字获取器</param>
 /// <param name="isReset">是否初始化数据</param>
 /// <param name="isSave">是否保存缓存对象防止被垃圾回收</param>
 /// <returns></returns>
 public DictionaryDictionary<valueType, modelType, groupKeyType, keyType> CreateDictionaryDictionary<groupKeyType, keyType>(Func<valueType, groupKeyType> getGroupKey, Func<valueType, keyType> getKey, bool isReset = true, bool isSave = false)
     where groupKeyType : IEquatable<groupKeyType>
     where keyType : IEquatable<keyType>
 {
     DictionaryDictionary<valueType, modelType, groupKeyType, keyType> cache = new DictionaryDictionary<valueType, modelType, groupKeyType, keyType>(this, getGroupKey, getKey, isReset);
     if (isSave) memberCaches.Add(cache);
     return cache;
 }
Example #2
0
        protected override void Awake()
        {
            base.Awake();

            m_collectibleCallbacks    = new DictionaryDictionary <string, string, Action>();
            m_interactiveCollectibles = new ListDictionary <string, ARInteractiveCollectibleItem>();
            m_currentCollectibles     = new HashSet <string>();
        }