public void _init() { // 创建工场GameObject GameObject go = GameObjectHelper.CreateGameObject(_factoryName, false); _factoryGoRootTrans = go.transform; // GameObjectHelper.SetParent(go, TransformPool.Instance.FindTrans()); }
public void OnAddTrickLine(System.Object obj) { TrackLineInfo info = obj as TrackLineInfo; TrackLineItem item = Instantiate(_trackLinePfb); item.Set(info); GameObjectHelper.SetParent(item.gameObject, _trackLinesParent); _trackItems.Add(item); _info.AddTrackLine(info); }
public override void ExtraOpertion(I_PoolObjectAbility ability) { PoolDefaultGameObject po = ability as PoolDefaultGameObject; if (po == null) { LogManager.Error("对象池工场Push的内容为空"); return; } GameObjectHelper.SetParent(po.gameObject, _factoryGoRootTrans); }
public void _real_open(PanelInfo viewData, System.Object info = null, Action <BaseView> action = null) { BaseView baseView = _panelFactory.Open(viewData, info); if (action != null) { action(baseView); } baseView.gameObject.SetActive(false); GameObjectHelper.SetParent(baseView.gameObject, _panelCanvas.gameObject, true); baseView.gameObject.SetActive(true); }
public virtual void SetParent(Transform trans) { GameObjectHelper.SetParent(gameObject, trans); }