Пример #1
0
    public void PlayHide(GUIDialogBase dialogBase)
    {
        if (showSequence != null)
        {
            showSequence.Kill();
        }

        if (guiControlLocation != null)
        {
            hideSequence = DOTween.Sequence();
            SettingHideEffect();
            hideSequence.AppendCallback(() => {
                OnEndHide();
                GUIManager.InvokeEvent(dialogName, DialogEvent.Hidden);
                dialogBase.DestroyDialog(this);
            });
            hideSequence.Play();
            showStatus = DialogStatus.Hiding;
        }
        else
        {
            showStatus = DialogStatus.Hiding;
            OnEndHide();
            GUIManager.InvokeEvent(dialogName, DialogEvent.Hidden);
            dialogBase.DestroyDialog(this);
        }
    }
Пример #2
0
    public void AddRectChecker(DialogName dialogName, RectTransform rect)
    {
        GUIDialogBase foundDlg = listDialogs.Find(dlg => dlg.DialogName == dialogName);

        if (foundDlg != null)
        {
            foundDlg.rectCheckers.Add(rect);
        }
    }
Пример #3
0
    public void UpdateDialogData(DialogName dlgName, string instanceId, object param = null)
    {
        GUIDialogBase foundDlg = listDialogs.Find(dlg => dlg.DialogName == dlgName);

        if (foundDlg == null)
        {
            Debug.LogError("Can not find dialog:" + dlgName.ToString());
            return;
        }

        foundDlg.UpdateData(instanceId, param);
    }
Пример #4
0
    public void HideDialog(DialogName dlgName, string instanceId, object param = null, bool forceImediate = false)
    {
        GUIDialogBase foundDlg = listDialogs.Find(dlg => dlg.DialogName == dlgName);

        if (foundDlg == null)
        {
            Debug.LogError("Can not find dialog:" + dlgName.ToString());
            return;
        }

        foundDlg.Hide(param, instanceId, forceImediate);
    }
Пример #5
0
    public void ShowDialog(DialogName dlgName, bool closeOnClickBlackBorder = false, object param = null)
    {
        if (!CanShow(dlgName))
        {
            return;
        }

        GUIDialogBase foundDlg = listDialogs.Find(dlg => dlg.DialogName == dlgName);

        if (foundDlg == null)
        {
            return;
        }

        foundDlg.TryShow(param, closeOnClickBlackBorder);
    }