private IEnumerator LeaveMenuAnimation(MenuUIController.MenuCloseDelegate onClose) { yield return((object)new WaitForEndOfFrame()); LeanTween.cancel(BackgroundTexture.gameObject); LeanTween.cancel(HistoryPanel.gameObject); LeanTween.value(this.BackgroundTexture.gameObject, delegate(float f) { this.BackgroundTexture.alpha = f; }, 0.5f, 0f, 0.2f); LeanTween.value(this.HistoryPanel.gameObject, delegate(float f) { this.HistoryPanel.alpha = f; }, 1f, 0f, 0.2f); GameSystem.Instance.MainUIController.FadeIn(0.2f); GameSystem.Instance.SceneController.RevealFace(0.2f); HistoryTextButton[] array = textButtons; foreach (HistoryTextButton t in array) { t.FadeOut(0.2f); } GameSystem.Instance.ExecuteActions(); yield return((object)new WaitForSeconds(0.3f)); onClose?.Invoke(); Object.Destroy(base.gameObject); }
private IEnumerator LeaveMenuAnimation(MenuUIController.MenuCloseDelegate onClose) { BackgroundTween.PlayReverse(); yield return((object)new WaitForSeconds(0.5f)); onClose?.Invoke(); Object.Destroy(base.gameObject); }