/// <summary> /// 创建对象池 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="key"></param> /// <param name="destory"></param> public static void CreateObjectPools <T>(PoolKey key, bool destory) { ObjectPools <T> pool = GetPools <T>(key); if (pool == null) { pool = new ObjectPools <T>(); pool.Create(destory); if (mPools.ContainsKey(key)) { mPools[key] = pool; } else { mPools.Add(key, pool); } } }