Exemple #1
0
 /// <summary>
 /// ui入栈
 /// </summary>
 /// <param name="stackable"></param>
 /// <param name="queued"></param>
 /// <param name="manualDepth"></param>
 public void EnStack(IStackableUI stackable, bool queued = false)
 {
     if (!queued || CanDisplayNextOnQueue())
     {
         StartCoroutine(EnStackCoroutine(stackable));
     }
     else
     {
         stackable.Show(false);
         _toEnstackWhenPossible.Enqueue(stackable);
     }
 }
Exemple #2
0
    /// <summary>
    /// wrap of Destack
    /// </summary>
    /// <param name="ui"></param>
    public static void Close(IStackableUI ui)
    {
        if (!Instance.IsStacked(ui) && !Instance.IsQueued(ui) && !object.ReferenceEquals(ui, null) && !ui.Equals(null) && ui.Visibility)
        {
            ui.Show(false);
            return;
        }

        if (Instance.IsStacked(ui))
        {
            Instance.Destack(ui);
        }

        if (Instance.IsQueued(ui))
        {
            Instance.Dequeue(ui);
        }
    }