diff --git a/Assets/Prototype/佩佩/Scripts/UFProcess.cs b/Assets/Prototype/佩佩/Scripts/UFProcess.cs index 2b3bf8737..093b4d9c3 100644 --- a/Assets/Prototype/佩佩/Scripts/UFProcess.cs +++ b/Assets/Prototype/佩佩/Scripts/UFProcess.cs @@ -32,13 +32,13 @@ public class UFProcess : MonoBehaviour memoryProcessImage.material.SetFloat("_GlitchFade", 0); } [YarnCommand("UFprocess")] - public void ProcessMemory(string memoryFinishedImageName, string UFImageName,bool isColorWrong=false) + public IEnumerator ProcessMemory(string memoryFinishedImageName, string UFImageName,bool isColorWrong=false) { if (isProcessing) { Debug.LogWarning("Already processing a memory. Please wait until the process is finished."); - return; + yield break; } isProcessing = true; // 开始处理,设置为true @@ -57,13 +57,13 @@ public class UFProcess : MonoBehaviour if (memoryFinishedSprite == null) { Debug.LogError("Memory finished image not found: " + memoryFinishedImageName); - return; + yield break; } if (UFMemorySprite == null) { Debug.LogError("UF image not found: " + UFImageName); - return; + yield break; } currentImage.material.SetFloat("_TwistUvAmount", 0); // 设置 Pixel_Fade 为0 @@ -123,6 +123,7 @@ public class UFProcess : MonoBehaviour UFImage.gameObject.SetActive(false); isProcessing = false; // 处理完成,设置为false }); + yield return memorySequence.WaitForCompletion(); } public bool IsProcessing() { diff --git a/Assets/Prototype/佩佩/佩佩视觉模块.unity b/Assets/Prototype/佩佩/佩佩视觉模块.unity index 671e679b3..cfbb2d157 100644 --- a/Assets/Prototype/佩佩/佩佩视觉模块.unity +++ b/Assets/Prototype/佩佩/佩佩视觉模块.unity @@ -8075,6 +8075,7 @@ RectTransform: m_LocalScale: {x: 0, y: 0, z: 0} m_ConstrainProportionsScale: 0 m_Children: + - {fileID: 555910940} - {fileID: 1613208941} - {fileID: 1649538715} - {fileID: 180053801} @@ -8085,7 +8086,6 @@ RectTransform: - {fileID: 2060600359} - {fileID: 550049039} - {fileID: 783911287} - - {fileID: 555910940} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} diff --git a/Assets/Resources/Art/Memory/liuying1-1.png b/Assets/Resources/Art/Memory/liuying1-1.png index 48de7cbc4..188317b23 100644 Binary files a/Assets/Resources/Art/Memory/liuying1-1.png and b/Assets/Resources/Art/Memory/liuying1-1.png differ diff --git a/Assets/Resources/Art/Memory/liuying1-2.png b/Assets/Resources/Art/Memory/liuying1-2.png index e6638c50d..55819db9e 100644 Binary files a/Assets/Resources/Art/Memory/liuying1-2.png and b/Assets/Resources/Art/Memory/liuying1-2.png differ diff --git a/Assets/Resources/Art/Memory/liuying1-3.png b/Assets/Resources/Art/Memory/liuying1-3.png index f7d17cfa4..049f18ce0 100644 Binary files a/Assets/Resources/Art/Memory/liuying1-3.png and b/Assets/Resources/Art/Memory/liuying1-3.png differ diff --git a/Assets/Resources/Materials/MemoryColor.mat b/Assets/Resources/Materials/MemoryColor.mat index ea0531edd..db0f8bc2c 100644 --- a/Assets/Resources/Materials/MemoryColor.mat +++ b/Assets/Resources/Materials/MemoryColor.mat @@ -164,7 +164,7 @@ Material: - _DirectionalAlphaFadeNoiseFactor: 0.2 - _DirectionalAlphaFadeRotation: 0 - _DirectionalAlphaFadeWidth: 0.2 - - _DirectionalDistortionFade: -2 + - _DirectionalDistortionFade: -14 - _DirectionalDistortionInvert: 0 - _DirectionalDistortionNoiseFactor: 0.2 - _DirectionalDistortionRandomDirection: 0.1 diff --git a/Assets/Resources/Yarn/Book/Book1.yarn b/Assets/Resources/Yarn/Book/Book1.yarn index 1c3044c39..04a011c48 100644 --- a/Assets/Resources/Yarn/Book/Book1.yarn +++ b/Assets/Resources/Yarn/Book/Book1.yarn @@ -5,7 +5,6 @@ tags: //<> ->打开书并翻到第四页 <> - <> <> //页码需要在编辑内找到book去配置 [command name=listen_closeBook /] diff --git a/Assets/Resources/Yarn/PeipeiTalk/PeipeiTalk1.yarn b/Assets/Resources/Yarn/PeipeiTalk/PeipeiTalk1.yarn index 5bba2e51f..00acec59a 100644 --- a/Assets/Resources/Yarn/PeipeiTalk/PeipeiTalk1.yarn +++ b/Assets/Resources/Yarn/PeipeiTalk/PeipeiTalk1.yarn @@ -78,8 +78,8 @@ position: 69,-488 ->查询手册 <> <> -///[command name=activate_socket_choice /] -///[options /] +[command name=listen_closeBook /] +[options /] ->CloseBook 我: 原来是通过UnstableFusion模块直接调用记忆进行绘图的。 我: 嗯…无论如何问题听起来都在头部。来看一看吧。 @@ -126,7 +126,7 @@ position: 71,-262 <> === title: Choice -position: 76,21 +position: 76,20 --- <> <> @@ -187,7 +187,7 @@ position: 76,21 ->查询手册 <> <> - [command name=activate_socket_choice /] + [command name=listen_closeBook /] [options /] ->CloseBook //<<解锁条目-UF模块1>> @@ -201,7 +201,7 @@ position: 76,21 ->查询手册 <> <> - [command name=activate_socket_choice /] + [command name=listen_closeBook /] [options /] ->CloseBook 我: 好的…我明白了。我需要做一个快速绘图流程,然后才能知道UF可能存在的问题。 @@ -361,7 +361,7 @@ position: 553,9 ->查询手册 <> <> -[command name=activate_socket_choice /] +[command name=listen_closeBook /] [options /] ->CloseBook 我: 好的,我明白了。 @@ -426,7 +426,7 @@ position: -384,22 ->查询手册 <> <> -[command name=activate_socket_choice /] +[command name=listen_closeBook /] [options /] ->CloseBook 我: 不兼容型排异反应:由于受到一些记忆的排异,UF无法正常读取素材。按照手册说的,看来需要在记忆模块定位排异源。 @@ -524,6 +524,8 @@ position: -266,367 ->检查手册 <> <> +[command name=listen_closeBook /] +[options /] ///[command name=activate_socket_choice /] ///[options /] ->CloseBook @@ -567,6 +569,7 @@ position: 85,821 --- /////头部视角-视觉-记忆桥截断术 //<> + [command name=activate_socket_choice /] [options /] -> MemoryEyeScissor <> @@ -677,7 +680,7 @@ position: 86,1272 佩佩: 其实还挺不错的……比我想象的好多了。 佩佩: 医生,我是你遇到过最矫情的员工吗? ->(一些互动对话,略) - <> + <> //////这段对话形式还需要探索下——我需要玩玩coffeetalk等 === diff --git a/Assets/Resources/Yarn/PeipeiTalk2/PeipeiTalk2.yarn b/Assets/Resources/Yarn/PeipeiTalk2/PeipeiTalk2.yarn index 9456a78cd..c64e01305 100644 --- a/Assets/Resources/Yarn/PeipeiTalk2/PeipeiTalk2.yarn +++ b/Assets/Resources/Yarn/PeipeiTalk2/PeipeiTalk2.yarn @@ -36,6 +36,8 @@ position: 66,-520 --- ///<<播放急切冲进门的声音>> //<> +<> +<> 佩佩: 对不起,我搞砸了。 我: 佩佩?怎么了? 我: 你眼睛那儿流的是…冷却液吗? @@ -517,6 +519,7 @@ position: 124,513 //<> <> +<> 我: 我想我们失败了,佩佩。 佩佩: 也就是说,现在没有任何办法了治好我了? 我: 我说过我一定会把你治好的……冷静。再想想…… @@ -592,12 +595,10 @@ position: 85,821 佩佩: 什么?……我不知道,他们就让我签了一个协议。 我: 好吧,先别管它了…… 我: 看起来数据都汇入了这个自我学习模块…… -<> + <> <> ->执行绘图 <> - <> - <> ///替代描述: 【观察自我学习模块的预览窗口】 ///替代描述: 【看到画面被UF揉碎、扭曲、变成罐头图片】 我: 这个过程……无法被停止。 @@ -622,7 +623,9 @@ position: 85,821 佩佩: 它回来了,想象力……回来了。我已经好久没有看到过颜色了,医生…帮我把色觉插上吧。 ///没插上之前是想象颜色吧,强调下插上后的感觉,就是不用想象颜色了,肯定和想象还是不一样的 ->执行色觉连接操作 + <> <> + <> <> <> <> diff --git a/Assets/Resources/Yarn/PeipeiTalk3/PeipeiTalk3.yarn b/Assets/Resources/Yarn/PeipeiTalk3/PeipeiTalk3.yarn index f7047e58b..70e1b1e8c 100644 --- a/Assets/Resources/Yarn/PeipeiTalk3/PeipeiTalk3.yarn +++ b/Assets/Resources/Yarn/PeipeiTalk3/PeipeiTalk3.yarn @@ -13,10 +13,11 @@ position: 0,0 title: Test1 position: 55,-1208 --- +<> +<> 我:坚持住,佩佩。 我:我们还剩…三个小时。我们开始吧。 ///进入维修界面 - <> ///设置成UF模块缺失的状态 <> @@ -333,7 +334,7 @@ position: 55,-1208 我: …… 我: 不。好像还有一个……不愿意被忘掉的记忆。 ->播放给医生的留言 -<> +<> 我: …… ->忘了这一切吧。 ->我们怎么到今天这步的? diff --git a/Assets/Resources/Yarn/ScreenEffect/ScreenEffect1.yarn b/Assets/Resources/Yarn/ScreenEffect/ScreenEffect1.yarn index 1afa579a7..ceb5140ba 100644 --- a/Assets/Resources/Yarn/ScreenEffect/ScreenEffect1.yarn +++ b/Assets/Resources/Yarn/ScreenEffect/ScreenEffect1.yarn @@ -10,8 +10,9 @@ title: ScreenEffect tags: --- ->黑屏过渡 - <> + <> <> + <> <> ->震动屏幕 <> diff --git a/Assets/Scenes/Persistence.unity b/Assets/Scenes/Persistence.unity index 988f5c8b1..8409a6572 100644 --- a/Assets/Scenes/Persistence.unity +++ b/Assets/Scenes/Persistence.unity @@ -1233,10 +1233,10 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 18a3ec3914131d44199ae33902edf159, type: 3} m_Name: m_EditorClassIdentifier: - runMode: 0 + runMode: 1 firstTalkSO: {fileID: 11400000, guid: 10601ce26230723479d875a630f15732, type: 2} clinicScene: ClinicScene - testYarnProject: Task + testYarnProject: CutLine --- !u!4 &719228339 Transform: m_ObjectHideFlags: 0 @@ -1576,12 +1576,12 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 886733270} serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0.49306798, y: -0.30097836, z: 0.10314257} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -747.66504, y: -442.781, z: 11.91071} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 0} + m_Father: {fileID: 1009826577} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &886733273 MonoBehaviour: @@ -1597,6 +1597,7 @@ MonoBehaviour: m_EditorClassIdentifier: book: {fileID: 996104069} CloseBookButton: {fileID: 791733126} + OepnBookButton: {fileID: 1210536474} --- !u!1 &973075152 GameObject: m_ObjectHideFlags: 0 @@ -1774,10 +1775,14 @@ PrefabInstance: propertyPath: m_IsActive value: 0 objectReference: {fileID: 0} + - target: {fileID: 11403584, guid: fe9bfb5044c0cc646baba1ad7d354100, type: 3} + propertyPath: m_Sprite + value: + objectReference: {fileID: 21300000, guid: 9392513c59cb1ca47baf6defed520dcd, type: 3} - target: {fileID: 11415212, guid: fe9bfb5044c0cc646baba1ad7d354100, type: 3} propertyPath: canvas value: - objectReference: {fileID: 0} + objectReference: {fileID: 1654679523} - target: {fileID: 11415212, guid: fe9bfb5044c0cc646baba1ad7d354100, type: 3} propertyPath: background value: @@ -1972,6 +1977,7 @@ Transform: m_Children: - {fileID: 72512886} - {fileID: 719228339} + - {fileID: 886733272} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1095691305 @@ -2348,19 +2354,7 @@ MonoBehaviour: m_TargetGraphic: {fileID: 1210536475} m_OnClick: m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 886733273} - m_TargetAssemblyTypeName: BookManager, Assembly-CSharp - m_MethodName: OpenBook - m_Mode: 1 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 + m_Calls: [] --- !u!114 &1210536475 MonoBehaviour: m_ObjectHideFlags: 0 @@ -3494,8 +3488,8 @@ RectTransform: m_LocalScale: {x: 0, y: 0, z: 0} m_ConstrainProportionsScale: 0 m_Children: - - {fileID: 996104070} - {fileID: 1210536473} + - {fileID: 996104070} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} @@ -4054,5 +4048,4 @@ SceneRoots: - {fileID: 1343879457} - {fileID: 1009826577} - {fileID: 1655147933} - - {fileID: 886733272} - {fileID: 1654679524} diff --git a/Assets/Scripts/FixSystem/Book/BookManager.cs b/Assets/Scripts/FixSystem/Book/BookManager.cs index da55d2f9b..10cf0e87e 100644 --- a/Assets/Scripts/FixSystem/Book/BookManager.cs +++ b/Assets/Scripts/FixSystem/Book/BookManager.cs @@ -15,6 +15,8 @@ public class BookManager : MonoBehaviour public Button CloseBookButton; + public Button OepnBookButton; + private RectTransform bookPos; public event System.Action OnBookClosed; @@ -28,6 +30,11 @@ public class BookManager : MonoBehaviour // 仅关闭书本,不执行额外操作 CloseBook(); }); + OepnBookButton.onClick.RemoveAllListeners(); // 确保不会重复绑定 + OepnBookButton.onClick.AddListener(() => + { + ButtonOpenBook(); + }); DialogController.Instance.RegisterOptionCommand("listen_closeBook", CombineCloseBook); flipmanager=book.gameObject.GetComponent(); bookPos=book.gameObject.GetComponent(); @@ -55,6 +62,11 @@ public void CombineCloseBook(YarnOption[] options) } } + public void ButtonOpenBook() + { + StartCoroutine(OpenBook()); + } + [YarnCommand("OpenBook")] public IEnumerator OpenBook() diff --git a/Assets/Scripts/FixSystem/Effect/ScreenEffectManager.cs b/Assets/Scripts/FixSystem/Effect/ScreenEffectManager.cs index 51701e476..73817c66a 100644 --- a/Assets/Scripts/FixSystem/Effect/ScreenEffectManager.cs +++ b/Assets/Scripts/FixSystem/Effect/ScreenEffectManager.cs @@ -31,7 +31,7 @@ public class ScreenEffectManager : MonoBehaviour else { Instance = this; - DontDestroyOnLoad(gameObject); // 可选:保持在场景加载之间 + //DontDestroyOnLoad(gameObject); // 可选:保持在场景加载之间 } } @@ -59,17 +59,23 @@ public class ScreenEffectManager : MonoBehaviour // 黑屏淡入淡出效果 [YarnCommand("fadeIn")] - public IEnumerator FadeIn(float waitTime, float duration) + public IEnumerator FadeIn(float duration) { blackoutPanel.gameObject.SetActive(true); Sequence fadeInSequence = DOTween.Sequence(); fadeInSequence.Append(blackoutPanel.DOFade(1f, duration)); - fadeInSequence.AppendInterval(waitTime); - fadeInSequence.Append(blackoutPanel.DOFade(0f, duration).OnComplete(() => + //fadeInSequence.AppendInterval(waitTime); + yield return fadeInSequence.WaitForCompletion(); + } + [YarnCommand("fadeOut")] + public IEnumerator FadeOut(float duration) + { + Sequence fadeOutSequence = DOTween.Sequence(); + fadeOutSequence.Append(blackoutPanel.DOFade(0f, duration).OnComplete(() => { blackoutPanel.gameObject.SetActive(false); })); - yield return fadeInSequence.WaitForCompletion(); + yield return fadeOutSequence.WaitForCompletion(); } // 红色闪烁效果 diff --git a/Assets/Scripts/FixSystem/Line/LineManager.cs b/Assets/Scripts/FixSystem/Line/LineManager.cs index 468ce0936..6a43da479 100644 --- a/Assets/Scripts/FixSystem/Line/LineManager.cs +++ b/Assets/Scripts/FixSystem/Line/LineManager.cs @@ -94,6 +94,8 @@ public void CutLine(InteractiveLineSegment originalLineSegment, Vector3 splitPoi // Immediately destroy the original line segment Destroy(originalLineSegment.gameObject); Debug.Log("线销毁了"); + StartCoroutine(ScreenEffectManager.Instance.FlashRed(0.3f)); + StartCoroutine(ScreenEffectManager.Instance.ShakeScreen()); SaveCutLine(originalLineSegment.name); // Start the coroutine to destroy the new line segments after fade in and out @@ -102,17 +104,12 @@ public void CutLine(InteractiveLineSegment originalLineSegment, Vector3 splitPoi private IEnumerator DestroyNewSegmentsAfterFade(GameObject firstLineSegmentObject, GameObject secondLineSegmentObject,InteractiveLineSegment originalLineSegment) { - // Assume FadeIn() is a method that starts the fade in animation and returns the duration of the animation - float fadeDuration = 2f; - DialogController.FadeIn(fadeDuration); - // Wait for the fade in animation to finish - // Destroy the new line segments - yield return new WaitForSeconds(fadeDuration); + yield return new WaitForSeconds(1.5f); + + yield return StartCoroutine(ScreenEffectManager.Instance.FadeIn(1)); Destroy(firstLineSegmentObject); Destroy(secondLineSegmentObject); - // Assume FadeOut() is a method that starts the fade out animation and returns the duration of the animation - DialogController.FadeOut(fadeDuration); - yield return new WaitForSeconds(fadeDuration); + yield return StartCoroutine(ScreenEffectManager.Instance.FadeOut(1)); originalLineSegment.Option.SelectOption(); }