Example #1
0
        /// <summary>
        /// Inits the entity pool config data.
        /// </summary>
        /// <param name="poolData">Pool data.</param>
        public void InitEntityPoolConfigData(ZEntityPoolTree poolData)
        {
            entityPool = new EntityPool();

            this.PoolNodeRoot = poolData;
            //this.startID = poolData.GetEntityStartID ();
            entityPool.Name   = gameObject.name;
            PoolNodeRoot.Name = gameObject.name;
            entityPool.Name   = poolData.Name;
        }
Example #2
0
        /// <summary>
        /// Reset this instance.
        /// </summary>
        public void Reset()
        {
            if (Application.isPlaying || !Application.isEditor)
            {
                throw new System.Exception("this function can't call in run time");
            }

            PoolNodeRoot = null;
            if (entityPool != null)
            {
                entityPool.ClearTemplate();
                entityPool = null;
            }

            EntityFileMgr.Clear();
        }