示例#1
0
        public static T GetObject <T>(string key, Vector3 pos) where T : Component
        {
            T         t     = null;
            BlockPool bPool = null;

            if (objPools.TryGetValue(key, out bPool))
            {
                t = bPool.GetObject <T>(pos);
            }
            if (t == null)
            {
                GameLog.Error(string.Format("{0} cache get err!", key));
            }
            return(t);
        }
示例#2
0
        public static GameObject GetObject(string key, Vector3 pos)
        {
            GameObject cacheGo = null;
            BlockPool  bPool   = null;

            if (objPools.TryGetValue(key, out bPool))
            {
                cacheGo = bPool.GetObject(pos);
            }
            if (cacheGo == null)
            {
                GameLog.Error(string.Format("{0} cache get err!", key));
            }
            return(cacheGo);
        }