Ejemplo n.º 1
0
 /// <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);
     });
 }
Ejemplo n.º 2
0
 /// <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>();
     });
 }
Ejemplo n.º 3
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();
                }
            });
        }
Ejemplo n.º 4
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();
                });
            }
        }
Ejemplo n.º 5
0
 protected void CloseSelf()
 {
     UIKit.ClosePanel(name);
 }
Ejemplo n.º 6
0
 internal static void ClosePanel <T>() where T : UIPanel
 {
     UIKit.ClosePanel <T>();
 }
Ejemplo n.º 7
0
 public static void ClosePanel(string panelName)
 {
     UIKit.ClosePanel(panelName);
 }
Ejemplo n.º 8
0
 protected override void OnBegin()
 {
     UIKit.ClosePanel(PanelName);
     Finish();
 }
Ejemplo n.º 9
0
 protected void CloseSelf()
 {
     UIKit.ClosePanel(this);
 }