From ed1bfe3baec948db5e23270f3507036ad2f854b3 Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期三, 10 十月 2018 22:01:36 +0800
Subject: [PATCH] 3870 【前端】角色升级表现修改
---
System/MainInterfacePanel/UpgradeWin.cs | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/System/MainInterfacePanel/UpgradeWin.cs b/System/MainInterfacePanel/UpgradeWin.cs
index 4a9e0e0..ebba5fa 100644
--- a/System/MainInterfacePanel/UpgradeWin.cs
+++ b/System/MainInterfacePanel/UpgradeWin.cs
@@ -18,6 +18,7 @@
[SerializeField] UIAlphaTween m_UIAlphaTween;
[SerializeField] Text m_TextLV;
[SerializeField] UIEffect m_UIEffect;
+ public float Delay = 0.5f;
#region Built-in
protected override void BindController()
{
@@ -35,8 +36,12 @@
protected override void OnActived()
{
m_UIEffect.Play();
- m_UIEffect.OnComplete = () => { Close(); };
- m_ScaleTween.Play(false,()=> { m_UIAlphaTween.Play(); });
+ m_UIEffect.OnComplete = () =>
+ {
+ StopCoroutine(DelayIEnumerator());
+ Close();
+ };
+ m_ScaleTween.Play(false, () => { StartCoroutine(DelayIEnumerator()); });
}
protected override void OnAfterOpen()
{
@@ -56,11 +61,18 @@
protected override void OnAfterClose()
{
}
+
+ IEnumerator DelayIEnumerator()
+ {
+ yield return new WaitForSeconds(Delay);
+ m_UIAlphaTween.Play();
+ }
#endregion
private void windowBeforeClose(Window _window)
{
if (_window is MainInterfaceWin)
{
+ StopCoroutine(DelayIEnumerator());
Close();
}
}
--
Gitblit v1.8.0