private IEnumerator LeaveScreen(LeaveConfigDelegate callback) { panel = Panel.GetComponent <UIPanel>(); LeanTween.value(Panel, UpdateAlpha, 1f, 0f, 0.3f); if (needShowMessageWindow) { GameSystem.Instance.MainUIController.FadeIn(0.3f); GameSystem.Instance.SceneController.RevealFace(0.3f); GameSystem.Instance.ExecuteActions(); } yield return((object)new WaitForSeconds(0.5f)); callback?.Invoke(); Object.Destroy(base.gameObject); }
public void Leave(LeaveConfigDelegate callback) { StartCoroutine(LeaveScreen(callback)); }