private async void CloseAsync(string uiName, Action callback) { await WaitAnimationFinished(); MaskManager.Instance.SetActive(true); for (int i = 0; i < showList.Count; i++) { ChildUI tempChildUI = showList[i]; if (tempChildUI != null && tempChildUI.UIContext.UIData.UIName == uiName) { showList.RemoveAt(i); break; } } ChildUI childUI = null; if (childDic.TryGetValue(uiName, out childUI)) { await childUI.DisableAsync(); } MaskManager.Instance.SetActive(false); callback?.Invoke(); }
public void Disable() { for (int i = 0; i < showList.Count; i++) { ChildUI childUI = showList[i]; if (childUI != null && !childUI.UIContext.UIData.HasAnimation) { childUI.DisableAsync().ConfigureAwait(true); } } }
public void BeforeDisable() { //父UI执行Disable之前,有动画的子UI需要播放退场动画 for (int i = 0; i < showList.Count; i++) { ChildUI childUI = showList[i]; if (childUI != null && childUI.UIContext.UIData.HasAnimation) { childUI.DisableAsync().ConfigureAwait(true); } } }