Beispiel #1
0
 public override void Show(Action <int> closeEvent, float sizeX, float sizeY, float showAnimationTime)
 {
     this.InitEFC();
     this.f_cmdbk     = closeEvent;
     this.sizeX_cmdbk = sizeX;
     this.sizeY_cmdbk = sizeY;
     this.aT_cmdbk    = showAnimationTime;
     if (this.useCMDAnim)
     {
         CMD parentDialog = this.GetParentDialog(true);
         if (null != parentDialog && parentDialog.GetActionStatus() == CommonDialog.ACT_STATUS.OPEN)
         {
             this._CMD_Parent    = parentDialog;
             this.isParentActing = true;
             AppCoroutine.Start(this.HideParentWithDelay(), false);
             base.HideDLG();
         }
         else
         {
             this.BaseShowWithDelay();
         }
     }
     else
     {
         this.BaseShowWithDelay();
     }
 }
Beispiel #2
0
 private IEnumerator OpenDigiGarden(CMD waitCloseWindow)
 {
     while (null != waitCloseWindow && waitCloseWindow.GetActionStatus() != CommonDialog.ACT_STATUS.CLOSED)
     {
         yield return(null);
     }
     GUIMain.ShowCommonDialog(null, "CMD_DigiGarden", null);
     yield break;
 }
Beispiel #3
0
    public void closeAll()
    {
        Dictionary <string, CommonDialog> dialogDic = GUIManager.GetDialogDic();

        foreach (string key in dialogDic.Keys)
        {
            GameObject gameObject = dialogDic[key].gameObject;
            if (this != dialogDic[key])
            {
                CMD cmd = (CMD)dialogDic[key];
                if (null != cmd && cmd.useCMDAnim && cmd.GetActionStatus() == CommonDialog.ACT_STATUS.OPEN)
                {
                    gameObject.SetActive(true);
                }
            }
        }
        GUIManager.CloseAllCommonDialog(null);
    }
Beispiel #4
0
    private CMD GetParentDialog(bool open)
    {
        float num = 100000f;
        CMD   cmd = null;
        Dictionary <string, CommonDialog> dialogDic = GUIManager.GetDialogDic();

        foreach (string key in dialogDic.Keys)
        {
            GameObject gameObject = dialogDic[key].gameObject;
            if (gameObject.transform.localPosition.z < num && this != dialogDic[key])
            {
                CMD cmd2 = (CMD)dialogDic[key];
                if (null != cmd2 && cmd2.useCMDAnim && cmd2.GetActionStatus() == CommonDialog.ACT_STATUS.OPEN && !this.DontLookParent)
                {
                    num = gameObject.transform.localPosition.z;
                    if (!cmd2.HideFromChild)
                    {
                        cmd = cmd2;
                    }
                    else
                    {
                        cmd = null;
                    }
                }
            }
        }
        if (!(null != cmd) || !cmd.useCMDAnim)
        {
            return(null);
        }
        if (open)
        {
            return(cmd);
        }
        float z  = base.GetOriginalPos().z;
        float z2 = cmd.GetOriginalPos().z;

        if (z2 > z)
        {
            return(cmd);
        }
        return(null);
    }