Esempio n. 1
0
 public ObjectPool(CacheReleaser releaser, int maxCacheCount = 64, int cacheLimitCount = 128)
 {
     mCacheBlockMaxCount = maxCacheCount;
     mBlockLimitCount    = cacheLimitCount;
     mReleaser           = releaser;
     mLastUpdateTime     = Time.realtimeSinceStartup;
     InitPool();
 }
Esempio n. 2
0
 public ObjectCachePool(CacheReleaser _releaser, int _max_cache_count = 64, int _cache_limit_count = 128, float _worn_time = 60f, GameObject _root_node = null)
 {
     cache_block_max_count_ = _max_cache_count;
     block_limit_count_     = _cache_limit_count;
     worn_time_             = _worn_time;
     root_node_             = _root_node;
     releaser_         = _releaser;
     last_update_time_ = Time.time;
     init_pool();
 }