Пример #1
0
    public void OnClickedGacha()
    {
        this.ForceHide(true);
        CommonDialog topDialog = GUIManager.GetTopDialog(null, false);

        if (null != topDialog)
        {
            if (topDialog.name == "CMD_MonsterGashaResult" || topDialog.name == "CMD_ChipGashaResult" || topDialog.name == "CMD_TicketGashaResult")
            {
                topDialog.ClosePanel(true);
            }
            else if (topDialog.name != "CMD_GashaTOP")
            {
                GUIManager.CloseAllCommonDialog(delegate
                {
                    this.PartsMenuShowDialog(null, "CMD_GashaTOP");
                });
            }
        }
        else
        {
            GUIManager.CloseAllCommonDialog(delegate
            {
                this.PartsMenuShowDialog(null, "CMD_GashaTOP");
            });
        }
    }
Пример #2
0
 protected override void Update()
 {
     base.Update();
     if (this.startShow)
     {
         if (this.isScaled)
         {
             float deltaTime = Time.deltaTime;
             if (this.openWait < 0f)
             {
                 this._opened = true;
                 this.WindowOpened();
                 if (this.act_status == CommonDialog.ACT_STATUS.START && this.isColliderDisable)
                 {
                     GUICollider.EnableAllCollider("WindowOpened CommonDialog = " + base.gameObject.name);
                     this.isColliderDisable = false;
                 }
                 this.act_status  = CommonDialog.ACT_STATUS.OPEN;
                 this.startShow   = false;
                 this.closeDialog = false;
             }
             this.openWait -= deltaTime;
         }
     }
     else if (this.endShow)
     {
         if (this.isScaled)
         {
             base.transform.localPosition = this.startPos;
             this.HideGUI();
             GUIManager.HideCommonDialog(this);
             if (this.eventList != null)
             {
                 int num = 0;
                 foreach (GUICollider guicollider in this.touchPanels)
                 {
                     guicollider.onTouchEnded -= this.eventList[num];
                     num++;
                 }
             }
             this.endShow     = false;
             this.closeDialog = true;
             base.gameObject.SetActive(false);
             GUIManager.DeleteCommonDialog(this);
             if (this.finish != null)
             {
                 if (-1 < this.forceReturnVL)
                 {
                     this.finish(this.forceReturnVL);
                 }
                 else
                 {
                     this.finish(this.returnVal);
                 }
             }
             if (this.ClosePanelRecursive)
             {
                 CommonDialog topDialog = GUIManager.GetTopDialog(this, false);
                 if (topDialog != null && topDialog.CanClosePanelRecursive)
                 {
                     topDialog.ClosePanelRecursive = true;
                     topDialog.ClosePanel(true);
                 }
             }
             UnityEngine.Object.Destroy(base.gameObject);
             if (this.isColliderDisable)
             {
                 GUICollider.EnableAllCollider("WindowClosed CommonDialog = " + base.gameObject.name);
                 this.isColliderDisable = false;
             }
             this.WindowClosed();
             if (this.actCallBackLast != null)
             {
                 this.actCallBackLast();
             }
         }
     }
     else if (this.touchPanels.Count == 0 && !this.closeDialog && !this.permanentMode && (GUIManager.someOneTouch || Input.GetKeyDown(KeyCode.Escape)))
     {
         global::Debug.Log("touchPanels");
         this.OnTouchBegan(default(Touch), default(Vector2));
         this.OnTouchEnded(default(Touch), default(Vector2), true);
     }
     if (GUIManager.ExtBackKeyReady && Input.GetKeyDown(KeyCode.Escape))
     {
         CommonDialog topDialog2 = GUIManager.GetTopDialog(null, false);
         if (topDialog2 != null && topDialog2.gameObject.name == base.gameObject.name && this.enableAndroidBackKey && !this.permanentMode && this.act_status == CommonDialog.ACT_STATUS.OPEN && !GUICollider.IsAllColliderDisable())
         {
             this.returnVal = -1;
             this.ClosePanel(true);
             SoundMng.Instance().PlaySE("SEInternal/Common/se_106", 0f, false, true, null, -1, 1f);
         }
     }
 }