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, bool showMessage) { this.isClosing = true; if (this.time > 0f) { yield return(new WaitForSeconds(this.time)); } yield return(null); yield return(null); LeanTween.value(this.Panel.gameObject, delegate(float f) { this.Panel.alpha = f; }, 1f, 0f, 0.3f); yield return(new WaitForSeconds(0.3f)); if (showMessage) { GameSystem.Instance.MainUIController.FadeIn(0.3f); GameSystem.Instance.SceneController.RevealFace(0.3f); GameSystem.Instance.ExecuteActions(); yield return(new WaitForSeconds(0.3f)); } if (onClose != null) { onClose(); } UnityEngine.Object.Destroy(base.gameObject); yield break; }
private IEnumerator LeaveMenuAnimation(MenuUIController.MenuCloseDelegate onClose) { yield return(new WaitForEndOfFrame()); LeanTween.cancel(this.BackgroundTexture.gameObject); LeanTween.cancel(this.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); foreach (HistoryTextButton historyTextButton in this.textButtons) { historyTextButton.FadeOut(0.2f); } GameSystem.Instance.ExecuteActions(); yield return(new WaitForSeconds(0.3f)); if (onClose != null) { onClose(); } UnityEngine.Object.Destroy(base.gameObject); yield break; }
private IEnumerator LeaveMenuAnimation(MenuUIController.MenuCloseDelegate onClose) { BackgroundTween.PlayReverse(); yield return((object)new WaitForSeconds(0.5f)); onClose?.Invoke(); Object.Destroy(base.gameObject); }
public void Leave(MenuUIController.MenuCloseDelegate onClose) { for (int i = 0; i < Sprites.Count; i++) { TitleScreenButton component = Sprites[i].GetComponent <TitleScreenButton>(); if (component != null) { component.IsLeaving = true; } } StartCoroutine(LeaveMenuAnimation(onClose)); }
private IEnumerator LeaveMenuAnimation(MenuUIController.MenuCloseDelegate onClose) { this.BackgroundTween.PlayReverse(); yield return(new WaitForSeconds(0.5f)); if (onClose != null) { onClose(); } UnityEngine.Object.Destroy(base.gameObject); yield break; }
public void LeaveMenu(MenuUIController.MenuCloseDelegate onClose, bool doPop) { menuUIController.LeaveMenu(delegate { if (doPop) { PopStateStack(); } UpdateWaits(); ExecuteActions(); if (onClose != null) { onClose(); } }, showMessage: false); }
public void Leave(MenuUIController.MenuCloseDelegate onClose) { StartCoroutine(LeaveMenuAnimation(onClose)); }