예제 #1
0
        private PopUpsController ShowPopup(GameObject popup_prefab, Transform parent, Vector3 position, Action openCallBack, Action closeCallBack)
        {
            if (!popup_prefab)
            {
                return(null);
            }
            PopUpsController pUp = CreateWindow(popup_prefab, parent, position);

            if (pUp)
            {
                pUp.PopUpInit(
                    (g) =>
                {
                    PopUpOpenH(g); if (openCallBack != null)
                    {
                        openCallBack();
                    }
                }, (g) =>
                {
                    PopUpCloseH(g);
                    if (closeCallBack != null)
                    {
                        closeCallBack();
                    }
                });
                pUp.ShowWindow();
            }
            return(pUp);
        }
예제 #2
0
        protected PopUpsController ShowPopUp(PopUpsController popup_prefab, Transform parent, Action openCallBack, Action closeCallBack)
        {
            if (!popup_prefab)
            {
                return(null);
            }
            PopUpsController pUp = CreateWindow(popup_prefab, parent);

            if (pUp)
            {
                pUp.PopUpInit(
                    (g) =>
                {
                    PopUpOpenEventHandler(g); openCallBack?.Invoke();
                }, (g) =>
                {
                    PopUpCloseEventHandler(g);
                    closeCallBack?.Invoke();
                });
                pUp.ShowWindow();
            }
            return(pUp);
        }