Beispiel #1
0
    public void OnShopButton()
    {
        AudioManager.PlaySe("sign-and-shop");
        var admission = new Admission_OldDownNewUp();

        UIEngine.Forward <ShopPage>(null, admission);
        HeadBarFloating.admission = new Admission_OldDownNewUp();
    }
Beispiel #2
0
    public void OnGoldClicked()
    {
        var top = UIEngine.Top;

        if (top is CorePage)
        {
            return;
        }
        if (top is ShopPage)
        {
            this.OnBackButton();
            return;
        }
        UIEngine.ShowFlaoting("BackgroundFloating");
        var admission = new Admission_OldDownNewUp();

        UIEngine.Forward <ShopPage>(null, admission);
        AudioManager.PlaySe("button");
        AudioManager.PlaySe("sign-and-shop");
    }
Beispiel #3
0
 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()");
     }
 }