Exemplo n.º 1
0
        public void _init()
        {
            // 创建工场GameObject
            GameObject go = GameObjectHelper.CreateGameObject(_factoryName, false);

            _factoryGoRootTrans = go.transform;
            //
            GameObjectHelper.SetParent(go, TransformPool.Instance.FindTrans());
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        public override void ExtraOpertion(I_PoolObjectAbility ability)
        {
            PoolDefaultGameObject po = ability as PoolDefaultGameObject;

            if (po == null)
            {
                LogManager.Error("对象池工场Push的内容为空");
                return;
            }
            GameObjectHelper.SetParent(po.gameObject, _factoryGoRootTrans);
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
 public virtual void SetParent(Transform trans)
 {
     GameObjectHelper.SetParent(gameObject, trans);
 }