示例#1
0
 /// <summary>
 /// 重新指定引用
 /// </summary>
 /// <returns></returns>
 public CacheObjInfo ReAssign()
 {
     if (mOriginalObjInfo != null)
     {
         CacheObjInfo info = mOriginalObjInfo.GetCacheObj(mOriginalObjInfo.pObjFlag);
         return(info);
     }
     return(null);
 }
示例#2
0
        /// <summary>
        /// 获取对象池中的某一缓存对象,varIsUseOriObj:是否获取源对象
        /// </summary>
        /// <param name="varFilePath"></param>
        /// <returns></returns>
        public CacheObjInfo GetCacheObjInfo(string varFilePath, ObjFlag varResult)
        {
            if (string.IsNullOrEmpty(varFilePath))
            {
                Helper.LogError("GameObjPool GetCacheObjInfo: Error caused by null varFilePath");
                return(null);
            }
            OriginalObjInfo oriInfo = GetOriginalObjInfo(varFilePath);

            if (oriInfo == null)
            {
                Helper.LogError("GameObjPool GetCacheObjInfo: Error caused by null OriginalObjInfo insatance,filePath: " + varFilePath);
                return(null);
            }
            return(oriInfo.GetCacheObj(varResult));
        }