示例#1
0
        public CoroutineHandler StartHandler(IEnumerator rIEnum)
        {
            var rCoroutineObj         = UtilTool.CreateGameObject(mCoroutineRootObj, "cotoutine");
            CoroutineHandler rHandler = rCoroutineObj.ReceiveComponent <CoroutineHandler>();

            rHandler.StartHandler(rIEnum);
            return(rHandler);
        }
示例#2
0
        public GameObjectPool(string rPoolName, GameObject rPrefabGo, int rInitCount = 0)
        {
            mPrefabGo   = rPrefabGo;
            mObjectPool = new TObjectPool <GameObject>(OnAlloc, OnFree, OnDestroy);

            RootGo = UtilTool.CreateGameObject(rPoolName);
            RootGo.SetActive(false);
            RootGo.transform.position = new Vector3(0, 1000, 0);

            for (int i = 0; i < rInitCount; i++)
            {
                mObjectPool.Alloc();
            }
        }