From 909d8d0f5b6f2487a4b6b6928c0b3b4c52bc4f1b Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Thu, 27 Mar 2025 15:48:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A1=86=E6=9E=B6=E5=B1=82?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/QFramework/Toolkits/UIKit/Scripts/UIManager.cs | 1 - Assets/Scripts/Actions/TimeLineAction.cs | 6 ++++-- Assets/Scripts/Launch.cs | 1 + Assets/Scripts/LaunchLoading.cs | 4 ++-- Assets/Scripts/UI/UIModeSelect.cs | 6 ++---- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Assets/QFramework/Toolkits/UIKit/Scripts/UIManager.cs b/Assets/QFramework/Toolkits/UIKit/Scripts/UIManager.cs index 99f2acb5..a53133a6 100644 --- a/Assets/QFramework/Toolkits/UIKit/Scripts/UIManager.cs +++ b/Assets/QFramework/Toolkits/UIKit/Scripts/UIManager.cs @@ -32,7 +32,6 @@ namespace QFramework { var uiRoot = UIRoot.Instance; Debug.Log("currentUIRoot:" + uiRoot); - StringEventSystem.Global.Send("UIRootCreated"); mInstance = MonoSingletonProperty.Instance; } diff --git a/Assets/Scripts/Actions/TimeLineAction.cs b/Assets/Scripts/Actions/TimeLineAction.cs index 817604e0..505746e4 100644 --- a/Assets/Scripts/Actions/TimeLineAction.cs +++ b/Assets/Scripts/Actions/TimeLineAction.cs @@ -60,14 +60,16 @@ public class TimeLineAction : IAction public void OnExecute(float dt) { + Debug.LogError($"time:{play.time * fps} >= curEnd:{curEndFrame} "); if (curEndFrame != -1 && play.time * fps >= curEndFrame) { - play.Stop(); play.time = curEndFrame / 24; - play.Evaluate(); + play.Pause(); + } if (play.state != PlayState.Playing) { + Debug.LogError("Finished"); Finished(); } } diff --git a/Assets/Scripts/Launch.cs b/Assets/Scripts/Launch.cs index 2e0049e4..504d511c 100644 --- a/Assets/Scripts/Launch.cs +++ b/Assets/Scripts/Launch.cs @@ -41,6 +41,7 @@ public class Launch : MonoBehaviour }); yield return UIKit.OpenPanelAsync(); + StringEventSystem.Global.Send("CloseDefaultLoading"); yield return UIKit.OpenPanelAsync(canvasLevel: UILevel.PopUI); UIKit.GetPanel().Hide(); yield return new WaitUntil(() => isLoadFinished == true); diff --git a/Assets/Scripts/LaunchLoading.cs b/Assets/Scripts/LaunchLoading.cs index bc686fa3..d3025ea7 100644 --- a/Assets/Scripts/LaunchLoading.cs +++ b/Assets/Scripts/LaunchLoading.cs @@ -11,7 +11,7 @@ public class LaunchLoading : MonoBehaviour private void Awake() { instance = this; - StringEventSystem.Global.Register("UIRootCreated", OnUIRootCreated); + StringEventSystem.Global.Register("CloseDefaultLoading", OnUIRootCreated); } private void OnUIRootCreated() @@ -20,7 +20,7 @@ public class LaunchLoading : MonoBehaviour } private void OnDestroy() { - StringEventSystem.Global.UnRegister("UIRootCreated", OnUIRootCreated); + StringEventSystem.Global.UnRegister("CloseDefaultLoading", OnUIRootCreated); } } diff --git a/Assets/Scripts/UI/UIModeSelect.cs b/Assets/Scripts/UI/UIModeSelect.cs index 1c80da8a..ed866b77 100644 --- a/Assets/Scripts/UI/UIModeSelect.cs +++ b/Assets/Scripts/UI/UIModeSelect.cs @@ -14,15 +14,13 @@ namespace QFramework.Example mData = uiData as UIModeSelectData ?? new UIModeSelectData(); TechBtn.onClick.AddListener(() => { - Hide(); Global.appTpe = Global.AppType.Study; - UIKit.OpenPanelAsync().ToAction().StartGlobal(); + UIKit.OpenPanelAsync().ToAction().StartGlobal(Hide); }); ExamBtn.onClick.AddListener(() => { - Hide(); Global.appTpe = Global.AppType.Exam; - UIKit.OpenPanelAsync().ToAction().StartGlobal(); + UIKit.OpenPanelAsync().ToAction().StartGlobal(Hide); }); }