public static void Init() { LuaEnv.AddIniter(Init); InitLuaEnv(); OnInit(); StartHotfix(); OperationTablePool = new RecyclePool <LuaBase>(() => luaEnv.NewTable()); }
public T Get <T>(long aoiId) where T : EntityComp { EntityComp protoData = null; Type protoType = typeof(T); RecyclePool <EntityComp> pool = null; if (poolMap.TryGetValue(protoType, out pool)) { protoData = pool.Alloc(); Dictionary <long, EntityComp> comps = null; if (compListMap.TryGetValue(typeof(T), out comps)) { comps.Add(aoiId, protoData); } } return((T)protoData); }
public void InitPool(RecyclePool <T> pool) { objectPool = pool; }