Exemple #1
0
    public void OnClose()
    {
        var admin = new Admission_PopdownOldPage();

        UIEngine.Back(null, admin);
        AudioManager.PlaySe("button");
    }
Exemple #2
0
    public void OnCloseButton()
    {
        var admission = new Admission_PopdownOldPage();

        UIEngine.Back(DialogResult.Cancel, admission);
        Complete?.Invoke(DialogResult.Cancel);
        Complete = null;
    }
Exemple #3
0
    public void OnConfirmButton()
    {
        var admission = new Admission_PopdownOldPage();

        UIEngine.Back(DialogResult.Conform, admission);
        Complete?.Invoke(DialogResult.Conform);
        Complete = null;
    }
Exemple #4
0
    public IEnumerator WaitAndBack()
    {
        yield return(new WaitForSeconds(0.35f));

        var admin = new Admission_PopdownOldPage();

        UIEngine.Back(null, admin);
    }
Exemple #5
0
    public void OnCloseButton()
    {
        var admission = new Admission_PopdownOldPage();

        UIEngine.Back(null, admission);
        AudioManager.PlaySe("button");
        Compelte?.Invoke();
        Compelte = null;
    }
    public async void CloseAsync()
    {
        await PlayFadeOutAsync();

        var top = UIEngine.Top;

        if (top.name == nameof(ImitateSharePage))
        {
            UIEngine.Back();
        }
    }
Exemple #7
0
    public void OnGetButton()
    {
        if (SDKManager.IsAdLoaded)
        {
            SDKManager.ShowInterAd(clicked => {
                if (clicked)
                {
                    Helper.AddGold(40);
                    if (sources == AdPageOpenSources.Shop)
                    {
                        PlayerStatus.lastUseAtGiftTime = TimestampUtil.Now;
                    }
                    PlayerStatus.Save();

                    Log.Scrren("AdPage: clicked: " + clicked);
                    var admission = new Admission_PopdownOldPage();
                    UIEngine.Back(null, admission);
                    Compelte?.Invoke();
                    Compelte = null;
                }
                else
                {
                    var param       = new DialogParam();
                    param.des       = "您没有点击广告,需要点击广告才能获得金币";
                    param.button    = "确认";
                    var popup       = new Admission_PopupNewPage();
                    var dialog      = UIEngine.Forward <DialogPage>(param, popup);
                    dialog.Complete = result => {
                        Log.Scrren("AdPage: clicked: " + clicked);
                        UIEngineHelper.WateAdmissionComplete(() => {
                            var admission = new Admission_PopdownOldPage();
                            UIEngine.Back(null, admission);
                            Compelte?.Invoke();
                            Compelte = null;
                        });
                    };
                }
            });
        }
        else
        {
            var admission = new Admission_PopdownOldPage();
            UIEngine.Back(null, admission);
            Compelte?.Invoke();
            Compelte = null;
        }

        AudioManager.PlaySe("button");
    }
Exemple #8
0
 public void OnButton(string msg)
 {
     if (msg == "back")
     {
         UIEngine.Back();
     }
     else if (msg == "clean")
     {
         CleanRank();
     }
     else if (msg == "shop")
     {
         GoShop();
     }
 }
Exemple #9
0
    public static void BackTo <T>() where T : Page
    {
        if (AdmissionManager.busing)
        {
            return;
        }
        var top = Top;

        while (typeof(T) != top.GetType())
        {
            UIEngine.Back();
            top = Top;
            if (top == null)
            {
                break;
            }
        }
    }
Exemple #10
0
    private void Close()
    {
        {
            var top = UIEngine.Top;
            if (top.name == nameof(ImitateShareDisplayPage))
            {
                UIEngine.Back();
            }
        }

        {
            var top = UIEngine.Top;
            if (top.name == nameof(ImitateSharePage))
            {
                var page = top as ImitateSharePage;
                page.CloseAsync();
            }
        }
    }
Exemple #11
0
 public void OnBack()
 {
     HotDogRoot.GetSingle().PlaySe("dianji");
     UIEngine.Back();
 }
 public void OnBackButton()
 {
     if (UIEngine.PagesCount > 1)
     {
         var top = UIEngine.Top;
         if (top is LevelCompletePage)
         {
             // do nothing
         }
         else if (top is DisplayPage)
         {
             // do nothing
         }
         else if (top is DialogPage)
         {
             // do nothing
             var dialog = top as DialogPage;
             dialog.OnCloseButton();
         }
         else if (top is AdPage)
         {
             // do nothing
             var adPage = top as AdPage;
             adPage.OnCloseButton();
         }
         if (top is LevelSettingsPage)
         {
             var admin = new Admission_PopdownOldPage();
             UIEngine.Back(null, admin);
         }
         else if (top is ShopPage)
         {
             var admin = new Admission_OldDownNewUp();
             UIEngine.Back(null, admin);
         }
         else if (top is CorePage)
         {
             var param = new DialogParam();
             param.des    = "退出会存储已进行的拼图,确定要退出吗?";
             param.button = "确定";
             var popup  = new Admission_PopupNewPage();
             var dialog = UIEngine.Forward <DialogPage>(param, popup);
             dialog.Complete = DialogResult =>
             {
                 if (DialogResult == DialogResult.Conform)
                 {
                     GameController.SaveUncompletePuzzle();
                     //UIEngine.BackTo<PicturePage>();
                     CoroutineManager.Create(WaitAndReturn());
                 }
             };
         }
         else
         {
             UIEngine.Back(null, admission);
         }
         AudioManager.PlaySe("button");
         SDKManager.OnHeadBarBackbutton();
     }
     else
     {
         Debug.Log("this is the only one page, can't call UIEngine.Back()");
     }
 }