From 979cbabd993d665c81e2b51358602a04d59b14a7 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期四, 11 十月 2018 10:20:07 +0800
Subject: [PATCH] Merge branch 'master' into 3687天赋功能
---
System/MainInterfacePanel/UpgradeWin.cs | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/System/MainInterfacePanel/UpgradeWin.cs b/System/MainInterfacePanel/UpgradeWin.cs
index 3bca967..ebba5fa 100644
--- a/System/MainInterfacePanel/UpgradeWin.cs
+++ b/System/MainInterfacePanel/UpgradeWin.cs
@@ -15,8 +15,10 @@
public class UpgradeWin : Window
{
[SerializeField] ScaleTween m_ScaleTween;
+ [SerializeField] UIAlphaTween m_UIAlphaTween;
[SerializeField] Text m_TextLV;
[SerializeField] UIEffect m_UIEffect;
+ public float Delay = 0.5f;
#region Built-in
protected override void BindController()
{
@@ -28,13 +30,18 @@
protected override void OnPreOpen()
{
+ m_UIAlphaTween.SetStartState();
m_TextLV.text = PlayerDatas.Instance.baseData.LV.ToString();
}
protected override void OnActived()
{
m_UIEffect.Play();
- m_UIEffect.OnComplete = () => { CloseImmediately(); };
- m_ScaleTween.Play();
+ m_UIEffect.OnComplete = () =>
+ {
+ StopCoroutine(DelayIEnumerator());
+ Close();
+ };
+ m_ScaleTween.Play(false, () => { StartCoroutine(DelayIEnumerator()); });
}
protected override void OnAfterOpen()
{
@@ -54,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