public CoroutineHandler StartHandler(IEnumerator rIEnum) { var rCoroutineObj = UtilTool.CreateGameObject(mCoroutineRootObj, "cotoutine"); CoroutineHandler rHandler = rCoroutineObj.ReceiveComponent <CoroutineHandler>(); rHandler.StartHandler(rIEnum); return(rHandler); }
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(); } }