예제 #1
0
        public void OnSkipBtnClicked()
        {
            if (this.SkipVideoClickedCallback != null)
            {
                this.SkipVideoClickedCallback();
            }
            GeneralDialogContext context = new GeneralDialogContext {
                type  = GeneralDialogContext.ButtonType.DoubleButton,
                title = LocalizationGeneralLogic.GetText("SkipCG_Confirm_Title", new object[0]),
                desc  = LocalizationGeneralLogic.GetText("SkipCG_Confirm_Content", new object[0]),
                notDestroyAfterTouchBG  = false,
                notDestroyAfterCallback = false,
                buttonCallBack          = delegate(bool confirmed) {
                    if (confirmed)
                    {
                        if (this.SkipVideoConfirmCallback != null)
                        {
                            base.view.transform.Find("SkipBtn").gameObject.SetActive(false);
                            this._skipBtnState = SkipButtonState.Close;
                            this.SkipVideoConfirmCallback();
                        }
                    }
                    else if (this.SkipVideoCancelCallback != null)
                    {
                        this.SkipVideoCancelCallback();
                    }
                }
            };

            this._currentGeneralDialog = context;
            Singleton <MainUIManager> .Instance.ShowDialog(this._currentGeneralDialog, UIType.Any);
        }
예제 #2
0
 public void OnBgBtnClicked()
 {
     if (this._withSkipBtn)
     {
         Animation component = base.view.transform.GetComponent <Animation>();
         if ((component != null) && !component.isPlaying)
         {
             if (this._skipBtnState == SkipButtonState.Close)
             {
                 component.Play("DisplayCgSkipBtn");
                 this._skipBtnState = SkipButtonState.TransitFromClose;
                 this.StartTransitSkipBtn();
             }
             else if (this._skipBtnState == SkipButtonState.Open)
             {
                 component.Play("DisappearCgSkipBtn");
                 this._skipBtnState = SkipButtonState.TransitFromOpen;
                 this.StartTransitSkipBtn();
             }
         }
     }
 }