private T _CloneOneObject(int i, List <T> list, Action <int, T> CallBack, GroupConfig config) { T t = null; if (i < list.Count) { t = list[i]; } else { if (config.tempT == null) { t = (T)((Component)FEngineManager.PoolObject(config.resName, config.parent.gameObject)); } else { t = FEngineManager.CloneObject <T>(config.tempT.gameObject, null); } list.Add(t); } t.gameObject.SetActive(true); if (config.toolData != null) { config.toolData.HandTool(i, t); } if (CallBack != null) { CallBack(i, t); } return(t); }
public override void Init(params object[] args) { mLoadPercent = new LoadPercent(); mLastLoadMode = mCurLoadMode; mCurLoadMode = (LoadMode)args[0]; EventManager.instance.Send(LoadSceneManager.LoadEvent, LoadSceneManager.LoadType.LT_Begin, mCurLoadMode); mCurLoadMode.PlayLoad(LoadSceneManager.LoadType.LT_Begin); BaseLoad bl = null; string planeTypeName = mCurLoadMode.PlaneName; planeTypeName = string.IsNullOrEmpty(planeTypeName)?ResConfig.FNORMALLOAD: planeTypeName; bl = FEngineManager.PoolObject <BaseLoad>(planeTypeName, this.gameObject); bl.GetComponent <RectTransform>().NormalRectTransform(); bl.IsPool = bl.InitOpen(this, mCurLoadMode); StartCoroutine(PlayFun(mCurLoadMode.ToSceneName, bl)); }
public UnitObject PoolObject(string name, GameObject pos = null) { return(FEngineManager.PoolObject(name, pos)); }
public T PoolObject <T>(string name, GameObject pos = null) where T : UnitObject { return(FEngineManager.PoolObject <T>(name, pos)); }