/// <summary>
 /// 绑定跳转逻辑
 /// </summary>
 /// <param name="selfPanel"></param>
 /// <param name="btn"></param>
 /// <typeparam name="T"></typeparam>
 public static Action Transition <TDstPanel>(this UIPanel selfBehaviour, IUIData uidata = null) where TDstPanel : UIPanel
 {
     return(() =>
     {
         UIKit.ClosePanel(selfBehaviour.name);
         UIKit.OpenPanel <TDstPanel>(uidata);
     });
 }
示例#2
0
        private IEnumerator Start()
        {
            yield return(new WaitForSeconds(0.2f));

            UIKit.OpenPanel(PanelName, Level);

            mOtherPanels.ForEach(panelTesterInfo => { UIKit.OpenPanel(panelTesterInfo.PanelName, panelTesterInfo.Level); });
        }
 /// <summary>
 /// 绑定跳转逻辑
 /// </summary>
 /// <param name="selfPanel"></param>
 /// <param name="btn"></param>
 /// <typeparam name="T"></typeparam>
 public static void BindTransition <TSrcPanel, TDstPanel>(this Button btn) where TSrcPanel : UIPanel
     where TDstPanel : UIPanel
 {
     btn.onClick.AddListener(() =>
     {
         UIKit.ClosePanel <TSrcPanel>();
         UIKit.OpenPanel <TDstPanel>();
     });
 }
        public static void DoTransition <TDstPanel>(this UIPanel selfBehaviour, UITransition transition,
                                                    UILevel uiLevel        = UILevel.Common,
                                                    IUIData uiData         = null,
                                                    string assetBundleName = null,
                                                    string prefabName      = null) where TDstPanel : UIPanel
        {
            transition.FromPanel   = selfBehaviour;
            transition.InCompleted = () =>
            {
                UIKit.OpenPanel <TDstPanel>(uiLevel, uiData, assetBundleName, prefabName);
            };


            UIKit.OpenPanel <UITransitionPanel>(UILevel.Forward, new UITransitionPanelData()
            {
                Transition = transition
            }, prefabName: "Resources/UITransitionPanel");
        }
示例#5
0
        private void Start()
        {
            // IVersionCheckStrategy strategy =  new SimulateVersionCheckStrategy();
            IVersionCheckStrategy strategy = new RealVersionCheckStrategy();

            strategy.VersionCheck((hasNewVersion, localVersion, serverVersion) =>
            {
                if (hasNewVersion)
                {
                    UIKit.OpenPanel <UIHotFixCheckPanel>(new UIHotFixCheckPanelData()
                    {
                        ServerVersion = serverVersion.Version.ToString(),

                        LocalVersion = localVersion.Version.ToString(),

                        OnCancel = () =>
                        {
                            UIKit.ClosePanel("resources://UIHotFixCheckPanel");
                            GetComponent <ILKitBehaviour>().Enable();
                        },

                        OnOk = () =>
                        {
                            strategy.UpdateRes(() =>
                            {
                                ILRuntimeScriptSetting.LoadDLLFromStreamingAssetsPath   = false;
                                AssetBundleSettings.LoadAssetResFromStreamingAssetsPath = false;

                                UIKit.ClosePanel("resources://UIHotFixCheckPanel");
                                GetComponent <ILKitBehaviour>().Enable();
                            });
                        }
                    }, prefabName: "resources://UIHotFixCheckPanel");
                }
                else
                {
                    GetComponent <ILKitBehaviour>().Enable();
                }
            });
        }
示例#6
0
        public override void Do(UITransitionPanel panel)
        {
            panel.ExecuteNode(this);

            if (FromPanel)
            {
                panel.Image.color = PanelColor;
                panel.Image.ColorAlpha(0.0f);

                DOTween.Sequence()
                .Append(panel.Image.DOFade(1.0f, FadeInDuration).OnComplete(() =>
                {
                    UIKit.ClosePanel(FromPanel.name);

                    InCompleted.InvokeGracefully();
                }))
                .Append(panel.Image.DOFade(0.0f, FadeOutDuration))
                .OnComplete(() =>
                {
                    OutCompleted.InvokeGracefully();
                    Finish();
                });
            }
            else
            {
                InCompleted.InvokeGracefully();
                panel.Image.color = PanelColor;
                panel.Image.ColorAlpha(1.0f);
                panel.Image.DOFade(0.0f, FadeOutDuration)
                .OnComplete(() =>
                {
                    OutCompleted.InvokeGracefully();
                    Finish();
                });
            }
        }
示例#7
0
 public static UIPanel OpenPanel(string panelName, UILevel level = UILevel.Common, string assetBundleName = null)
 {
     return(UIKit.OpenPanel(panelName, level, assetBundleName));
 }
示例#8
0
 public static UIPanel OpenPanel(string panelName)
 {
     return(UIKit.OpenPanel(panelName));
 }
示例#9
0
 internal static T GetPanel <T>() where T : UIPanel
 {
     return(UIKit.GetPanel <T>());
 }
示例#10
0
 public static UIPanel GetPanel(string panelName)
 {
     return(UIKit.GetPanel(panelName));
 }
示例#11
0
 internal static void ShowPanel <T>() where T : UIPanel
 {
     UIKit.ShowPanel <T>();
 }
示例#12
0
 internal static void HidePanel <T>() where T : UIPanel
 {
     UIKit.HidePanel <T>();
 }
示例#13
0
 internal static T OpenPanel <T>(IUIData uiData, string assetBundleName = null,
                                 string prefabName = null) where T : UIPanel
 {
     return(UIKit.OpenPanel <T>(UILevel.Common, uiData, assetBundleName, prefabName));
 }
示例#14
0
 protected override void OnBegin()
 {
     UIKit.ClosePanel(PanelName);
     Finish();
 }
示例#15
0
 protected void CloseSelf()
 {
     UIKit.ClosePanel(name);
 }
示例#16
0
 public void Push <T>() where T : UIPanel
 {
     Push(UIKit.GetPanel <T>());
 }
示例#17
0
 public static void HidePanel(string panelName)
 {
     UIKit.HidePanel(panelName);
 }
示例#18
0
 public static void ShowPanel(string panelName)
 {
     UIKit.ShowPanel(panelName);
 }
示例#19
0
 public static void ClosePanel(string panelName)
 {
     UIKit.ClosePanel(panelName);
 }
示例#20
0
 protected override void OnBegin()
 {
     UIKit.OpenPanel(Name, Level);
     Finish();
 }
示例#21
0
 internal static void ClosePanel <T>() where T : UIPanel
 {
     UIKit.ClosePanel <T>();
 }
示例#22
0
 public void Back(string currentPanelName)
 {
     UIKit.Back(currentPanelName);
 }
示例#23
0
 protected void CloseSelf()
 {
     UIKit.ClosePanel(this);
 }
示例#24
0
 protected void Back()
 {
     UIKit.Back(name);
 }
示例#25
0
 public void Back <T>()
 {
     UIKit.Back <T>();
 }