Esempio n. 1
0
        public virtual void Dispose()
        {
            IsDispose = true;

            if (this.IsFromPool)
            {
                IObjectPoolManager tmpPoolMgr = GameModuleManager.GetModule <IObjectPoolManager>();

                if (null != tmpPoolMgr)
                {
                    var tmpObjPool = tmpPoolMgr.GetObjectPoolByType(this.GetType());
                    tmpObjPool.Unspawn(this);
                }
            }
        }