From 39d28c1a29b34fd315e6a4065e2080c6dd61ac47 Mon Sep 17 00:00:00 2001 From: Ding Yuntian <1491671119@qq.com> Date: Thu, 26 Mar 2026 14:11:47 +0800 Subject: [PATCH] =?UTF-8?q?refactor(scene-mgmt):=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E5=A4=96=E6=99=AF=E4=B8=93=E7=94=A8=E6=97=B6=E9=97=B4=E8=BD=B4?= =?UTF-8?q?=E5=91=BD=E4=BB=A4=E5=B9=B6=E7=BB=9F=E4=B8=80=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Made-with: Cursor --- .../Yarn/FP_Day1_begin/Day1_begin.yarn | 2 +- .../SceneCenter/OutsideCenter.cs | 25 +------------------ .../SceneCenter/OutsideYarnCommand.cs | 20 --------------- .../SceneCenter/OutsideYarnCommand.cs.meta | 11 -------- 4 files changed, 2 insertions(+), 56 deletions(-) delete mode 100644 Assets/Scripts/SceneManagement/SceneCenter/OutsideYarnCommand.cs delete mode 100644 Assets/Scripts/SceneManagement/SceneCenter/OutsideYarnCommand.cs.meta diff --git a/Assets/Resources/Yarn/FP_Day1_begin/Day1_begin.yarn b/Assets/Resources/Yarn/FP_Day1_begin/Day1_begin.yarn index 641c7cf8b..2c54d5d49 100644 --- a/Assets/Resources/Yarn/FP_Day1_begin/Day1_begin.yarn +++ b/Assets/Resources/Yarn/FP_Day1_begin/Day1_begin.yarn @@ -267,7 +267,7 @@ position: 250,200 <> <> <> -<> +<> <> yl: 看来我们的医生不知道自己应该什么时间到岗。 #line:0f1db57 <> diff --git a/Assets/Scripts/SceneManagement/SceneCenter/OutsideCenter.cs b/Assets/Scripts/SceneManagement/SceneCenter/OutsideCenter.cs index 953cb06d5..289989196 100644 --- a/Assets/Scripts/SceneManagement/SceneCenter/OutsideCenter.cs +++ b/Assets/Scripts/SceneManagement/SceneCenter/OutsideCenter.cs @@ -1,38 +1,15 @@ using AibisDream.Kit; -using UnityEngine; -using UnityEngine.Playables; -using System.Collections; namespace AibisDream { public class OutsideCenter : Singleton { public BubbleSlotGroup bubbleSlotGroup; - public PlayableDirector director; - + public override void OnSingletonInit() { // 加载气泡 DialogUIManager.Instance.LoadBubbles(bubbleSlotGroup.CollectData()); } - - public void PlayTimeline(string timelinePath) - { - StartCoroutine(PlayTimelineCoroutine()); - } - - public void PlayTimelineAsync(string timelinePath) - { - director.Play(); - } - - public IEnumerator PlayTimelineCoroutine() - { - director.Play(); - while (director.state == PlayState.Playing) - { - yield return null; - } - } } } diff --git a/Assets/Scripts/SceneManagement/SceneCenter/OutsideYarnCommand.cs b/Assets/Scripts/SceneManagement/SceneCenter/OutsideYarnCommand.cs deleted file mode 100644 index 267f98835..000000000 --- a/Assets/Scripts/SceneManagement/SceneCenter/OutsideYarnCommand.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Collections; -using Yarn.Unity; - -namespace AibisDream -{ - public static class OutsideYarnCommand - { - [YarnCommand("outside_play_timeline")] - public static IEnumerator PlayTimeline() - { - yield return OutsideCenter.Instance.PlayTimelineCoroutine(); - } - - [YarnCommand("outside_play_timeline_nowait")] - public static void PlayTimelineAsync(string timelinePath) - { - OutsideCenter.Instance.PlayTimelineAsync(timelinePath); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/SceneManagement/SceneCenter/OutsideYarnCommand.cs.meta b/Assets/Scripts/SceneManagement/SceneCenter/OutsideYarnCommand.cs.meta deleted file mode 100644 index e1f78915d..000000000 --- a/Assets/Scripts/SceneManagement/SceneCenter/OutsideYarnCommand.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3c92bc3944d75174b8894851d86f50c5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: