From 19b0debe92ca1775fed05915895f2a01c908ef82 Mon Sep 17 00:00:00 2001 From: bottlefish <781230111@qq.com> Date: Sun, 19 Jan 2025 19:24:32 +0800 Subject: [PATCH] =?UTF-8?q?UF=E6=A3=80=E6=9F=A5=E5=92=8C=E5=81=9C=E6=AD=A2?= =?UTF-8?q?=E6=83=B3=E8=B1=A1=E6=8E=A5=E5=85=A5=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Prototype/佩佩/Scripts/EyeTarget.cs | 18 ++ .../Resources/Yarn/PeipeiTalk2/EventNode.yarn | 24 +-- Assets/Resources/Yarn/PeipeiTalk2/UF检查.yarn | 118 ++++++++++++- .../Resources/Yarn/PeipeiTalk2/停止想象.yarn | 100 ++++++++++- Assets/Resources/Yarn/PeipeiTalk2/分析.yarn | 1 + .../Yarn/PeipeiTalk2/第一次发热.yarn | 3 +- .../Yarn/Re_LTS_Peipeiday1/Memory.yarn | 42 ++--- .../Re_LTS_Peipeiday2/Re_LTS_Peipeiday2.yarn | 11 +- Assets/Scenes/PeipeiFixScene.unity | 67 ++++---- Assets/Scenes/Persistence.unity | 4 +- Assets/Scenes/VFXtest/想象效果.asset | 108 +++++++++++- Assets/Scenes/VFXtest/最终效果 Profile.asset | 2 +- .../Scripts/FixSystem/HeatMap/HeatTest.shader | 12 +- .../Scripts/FixSystemNew/FixStateMachine.cs | 4 + Assets/Scripts/MiniGame/Peipei/UF/UFSystem.cs | 156 +++++++++++++++++- 15 files changed, 579 insertions(+), 91 deletions(-) diff --git a/Assets/Prototype/佩佩/Scripts/EyeTarget.cs b/Assets/Prototype/佩佩/Scripts/EyeTarget.cs index c0e01925f..958e54bb5 100644 --- a/Assets/Prototype/佩佩/Scripts/EyeTarget.cs +++ b/Assets/Prototype/佩佩/Scripts/EyeTarget.cs @@ -3,6 +3,9 @@ using UnityEngine; using DG.Tweening; using Unity.Mathematics; using AibisDream; +using UnityEngine.Rendering.Universal; +using UnityEngine.Rendering; +using AibisDream.Utility; public class EyeTarget : MonoBehaviour { @@ -20,6 +23,7 @@ public class EyeTarget : MonoBehaviour [SerializeField] private SpriteRenderer wrongColorSpriteRenderer; + [SerializeField]private SpriteRenderer imageSpriteRender; private Material backMaterial; private Material wrongColorMaterial; @@ -41,12 +45,26 @@ public class EyeTarget : MonoBehaviour SetToMinBurnRadius(); SetToMaxBlur(false); SetToNoWrongColor(); + SetNoImage(); } private void Start() { } + public void ImageIn(float duration) + { + imageSpriteRender.DOFade(1,duration); + } + public void ImageOut(float duration) + { + imageSpriteRender.DOFade(0,duration); + } + public void SetNoImage() + { + imageSpriteRender.SetAlpha(0); + } + public void SetToMinBurnRadius() { forwardMaterial.SetFloat("_SourceGlowDissolveFade", burnRadiusMin); diff --git a/Assets/Resources/Yarn/PeipeiTalk2/EventNode.yarn b/Assets/Resources/Yarn/PeipeiTalk2/EventNode.yarn index 2848f85e2..a25480cb1 100644 --- a/Assets/Resources/Yarn/PeipeiTalk2/EventNode.yarn +++ b/Assets/Resources/Yarn/PeipeiTalk2/EventNode.yarn @@ -105,15 +105,6 @@ position: 480,-2840 <> <> === -title: IntoEyeView -tags: -group:视觉检查 -colorID: 6 -position: 244,271 ---- -<> -<> -=== title: UFDeepIn tags: @@ -123,7 +114,8 @@ tags: <> <> <> - <> + <> + // <> <> === title: MemoryDeepIn @@ -139,4 +131,16 @@ position: -9,21 <> <> === +title: IntoEyeView +tags: +group:视觉检查 +colorID: 6 +position: 244,271 +--- +<> + <> +<> + <> +<> +=== diff --git a/Assets/Resources/Yarn/PeipeiTalk2/UF检查.yarn b/Assets/Resources/Yarn/PeipeiTalk2/UF检查.yarn index 293c84a30..4d0775490 100644 --- a/Assets/Resources/Yarn/PeipeiTalk2/UF检查.yarn +++ b/Assets/Resources/Yarn/PeipeiTalk2/UF检查.yarn @@ -1,9 +1,11 @@ -title: 进入UF检查 +title: 进入UF检查 tags: position: 43,-97 --- +<> 现在可以插线来深入UF了 === + title: 结束UF检查 position: 275,-222 --- @@ -14,10 +16,112 @@ position: 275,-222 title: 第一次进入UF检查 position: 275,-222 --- -// <> -【功能制作中】 -【这里看到UF控制下的视觉】 -【你可以操控UF,发现佩佩在给UF理解的世界注入色彩想象】 -【这个过程变得越来越不受控制,最后你失去了控制,视点在疯狂移动】 -<> +<> +// 【功能制作中】 +// 【这里看到UF控制下的视觉】 +// 【你可以操控UF,发现佩佩在给UF理解的世界注入色彩想象】 +// 【这个过程变得越来越不受控制,最后你失去了控制,视点在疯狂移动】 +// <> +=== +title: UFCheck +tags: +colorID: 3 +group:视觉检查 +position: -2052,-2351 +--- +me: 【占位】这就是UF看到的世界么 +me: 【占位】形状,数据... +peiepi:【占位】不是这个样子...不是这个样子的... +<> +<> + <> + <> + me:【占位】发生了什么?数据错乱了? + <> + peiepi:【占位】我还记得,我还记得那些颜色... + <> + <> + <> + <> + <> + <> + <> + <> + <> + <> + <> +<> + <> + <> + me:【占位】发生了什么?数据错乱了? + <> + peiepi:【占位】我还记得,我还记得那些颜色... + <> + <> + <> + <> + <> + <> + <> + <> + <> + <> + <> +<> + <> + <> + me:【占位】发生了什么?数据错乱了? + <> + peiepi:【占位】我还记得,我还记得那些颜色... + <> + <> + <> + <> + <> + <> + <> + <> + <> + <> + <> +<> + <> + <> + me:【占位】发生了什么?数据错乱了? + <> + peiepi:【占位】我还记得,我还记得那些颜色... + <> + <> + <> + <> + <> + <> + <> + <> + <> + <> + <> +<> +<> +me: 这就是UF发热的原因么...佩佩在修改UF的数据 +me: 我们先出去吧 + <> + <> +=== +title: UFCheckEnd +tags: +colorID: 3 +group:视觉检查 +position: -2052,-2351 +--- +<> +=== +title: 退出UF +tags: +colorID: 3 +group:视觉检查 +position: -2052,-2351 +--- +<> +<> === \ No newline at end of file diff --git a/Assets/Resources/Yarn/PeipeiTalk2/停止想象.yarn b/Assets/Resources/Yarn/PeipeiTalk2/停止想象.yarn index 95b75589e..c5dee8fc8 100644 --- a/Assets/Resources/Yarn/PeipeiTalk2/停止想象.yarn +++ b/Assets/Resources/Yarn/PeipeiTalk2/停止想象.yarn @@ -2,7 +2,9 @@ title: 进入停止想象 tags: position: 428,-88 --- +<> <> +<> 【占位】:我们去UF模块来引导佩佩吧 === title: 结束停止想象 @@ -12,11 +14,92 @@ position: 259,432 <> === -title: 进入UF检查引导停止想象 +title: 停止想象Check position: 71,-93 --- -// <> -【这里佩佩试图停止想象,但是失败了,并且引起了发热】 +<> + <> + me: 颜色没有出现?似乎…… + <> + me: 好的…我想我们的猜想是正确的。 + //<> + peipei: 太好了,医生! + peipei: 我们总算找到原因了!对吧? + me: 别激动…佩佩。 + //TODO-感觉这里可以先让佩佩把眼睛闭上? + peipei: 我感觉很好,太好了! + peipei: 是不是只要我能停止想象,问题就解决了? + me: 只要你能控制住,我想是的。 + peipei: 那就让我试试吧。 + peipei: 我们已经走到了这里…我不能放弃。 + peipei: 让我试试……抑制想象力。 + peipei: 呼… + peipei: 我们来吧。 + <> +<> + //颜色不出现,一会又出现了 + <> + me: 似乎成功了,很好…… + <> + peipei: 啊…痛! + <> + peipei: 不…不是这个颜色… + peipei: 不,根本不应该有颜色。停止。停止。停止想象,停止想象。 + //<<画面波动了一下,颜色消失>> + <> + peipei: 停止想象…… + //<<颜色慢慢重新出现>> + peipei: 好痛,呼…… + <> + <> + <> + peipei: 停止想象,停止想象,停止想象,停止! + <> + me: 冷静,佩佩。 + me: 佩佩… + peipei: 啧,现在它变得这么顽固了…… + peipei: 不,医生,我想再试试。 + <> +<> + <> + peipei: 不!停止,停止! + <> + me: 好了,快停下。 + me: 不能再这样下去了。 + peipei: 别用那种态度……你可是要治好我! + me: 啊?抱歉,我…… #auto_next + peipei: 你以为我是怎么走到今天的? + me: 不!我只是感觉…… + peipei: 我很可怜? + me: 不… #auto_next + peipei: 医生,不要可怜我…… + peipei: 它没有用。 + peipei: 我必须要完成工作,证明我自己…… + peipei: 学美术,做美术相关的工作…… + peipei: 我还要继续画下去,我要画一辈子画! + <> + peipei: 这是我选择的生活!你绝对不能让我回头,知道吗! + <> + peipei: 来,继续。 + me: …… + me: 佩佩,你真的已经太痛苦了,不要再虐待自己了……我不想看到…… + peipei: 别再用那种高高在上的语气说话了,来啊! + <> + <> +<> + //颜色出现 + <> + peipei: 不!停止! + <> + peipei: 停止想象!停止想象!停止想象! + <> + peipei: 都是因为你,都是因为你!我…我才…… + <> + me: 佩佩,快停下。 + <> + peipei: 停止想象!停止想象…停止…… + <> + me: 佩佩! me: 我不该允许她这么做的…… me: 感觉她全身都好烫,赶紧降温!!! me: 妈的,事到如今……什么规定都管不了了。 @@ -26,6 +109,17 @@ position: 71,-93 <> <> <> +<> +<> +=== + +title: UF停止想象CheckEnd +tags: +colorID: 3 +group:视觉检查 +position: -2052,-2351 +--- +<> === title: 降温失败的对话 position: 255,114 diff --git a/Assets/Resources/Yarn/PeipeiTalk2/分析.yarn b/Assets/Resources/Yarn/PeipeiTalk2/分析.yarn index 17590ced8..820ae4c8e 100644 --- a/Assets/Resources/Yarn/PeipeiTalk2/分析.yarn +++ b/Assets/Resources/Yarn/PeipeiTalk2/分析.yarn @@ -2,6 +2,7 @@ title: 进入分析 tags: position: 43,-97 --- +<> ///可以先用思考专用黑幕,把showobj之外的部分都盖住,每次分析用showobj展示ppt,做一个思考阶段,把线索回顾一下 【占位】:刚才我们看到似乎记忆在破坏UF做的图像学习 【占位】:查询,这是原型改造遗留的bug【想象】(这里感觉讲不清楚不行,但是讲清楚了可能会有点剧透) diff --git a/Assets/Resources/Yarn/PeipeiTalk2/第一次发热.yarn b/Assets/Resources/Yarn/PeipeiTalk2/第一次发热.yarn index 0ae23d71f..bc669261e 100644 --- a/Assets/Resources/Yarn/PeipeiTalk2/第一次发热.yarn +++ b/Assets/Resources/Yarn/PeipeiTalk2/第一次发热.yarn @@ -1,8 +1,9 @@ -title: 进入第一次发热 +title: 进入第一次发热 tags: colorID: 3 position: 322,-1030 --- +<> <> === diff --git a/Assets/Resources/Yarn/Re_LTS_Peipeiday1/Memory.yarn b/Assets/Resources/Yarn/Re_LTS_Peipeiday1/Memory.yarn index 12a32725f..ed004f147 100644 --- a/Assets/Resources/Yarn/Re_LTS_Peipeiday1/Memory.yarn +++ b/Assets/Resources/Yarn/Re_LTS_Peipeiday1/Memory.yarn @@ -1,4 +1,4 @@ -title: MemoryDeepIn +title: MemoryDeepIn tags: --- <> @@ -73,26 +73,26 @@ position: -1,976 === -title: OnMemoryViewShow -tags: -colorID: 3 -position: -9,239 ---- -<> - me: 把打孔带放进插槽里,读取记忆吧。 - <> -<> -<> - <> - me: 该看的都看过了 - <> - <> -<4>> - me: 该看的都看过了 - <> - <> -<> -=== +// title: OnMemoryViewShow +// tags: +// colorID: 3 +// position: -9,239 +// --- +// <> +// me: 把打孔带放进插槽里,读取记忆吧。 +// <> +// <> +// <> +// <> +// me: 该看的都看过了 +// <> +// <> +// <4>> +// me: 该看的都看过了 +// <> +// <> +// <> +// === title: OnMemoryInsert diff --git a/Assets/Resources/Yarn/Re_LTS_Peipeiday2/Re_LTS_Peipeiday2.yarn b/Assets/Resources/Yarn/Re_LTS_Peipeiday2/Re_LTS_Peipeiday2.yarn index 56f7ce521..f5e814c41 100644 --- a/Assets/Resources/Yarn/Re_LTS_Peipeiday2/Re_LTS_Peipeiday2.yarn +++ b/Assets/Resources/Yarn/Re_LTS_Peipeiday2/Re_LTS_Peipeiday2.yarn @@ -210,7 +210,7 @@ me: 终于好了……去记忆模块里看看是怎么回事吧。 title: 主维修界面游戏状态检查 tags: colorID: 3 -position: 238,-441 +position: 238,-443 --- <>//结尾talk <> @@ -872,7 +872,7 @@ peipei: 医生? title: 结论2 tags: colorID: 8 -position: -286,192 +position: -530,-61 --- <> me: 佩佩? @@ -958,6 +958,7 @@ me: 何况,如果不清除掉记忆中的色彩,症状会不会…… === title: 色彩抹除后续 +position: -23,-260 --- peipei: 医生…… <> @@ -1009,6 +1010,7 @@ peipei: 我们去维修室吧。 title: 色彩抹除选项组_level1 +position: -38,-77 --- ->建议直接进行色彩抹除 me: 你不会想这么做的。 @@ -1031,6 +1033,7 @@ title: 色彩抹除选项组_level1 === title: 色彩抹除选择组_level2 +position: -302,42 --- ->建议直接进行色彩抹除 me: 佩佩… @@ -1076,7 +1079,7 @@ title: 色彩抹除选择组_level2 title: 安装晶圆 tags: colorID: 8 -position: -75,748 +position: -63,715 --- <> me: 装好了…… @@ -1094,7 +1097,7 @@ me: 只要进视觉做一次重置…就好了。 title: FinishInstall tags: colorID: 8 -position: -309,564 +position: -16,371 --- <> <> diff --git a/Assets/Scenes/PeipeiFixScene.unity b/Assets/Scenes/PeipeiFixScene.unity index 1ceea2bf8..b73297ff1 100644 --- a/Assets/Scenes/PeipeiFixScene.unity +++ b/Assets/Scenes/PeipeiFixScene.unity @@ -1716,7 +1716,6 @@ MonoBehaviour: - {fileID: 247366036} - {fileID: 1589824317} - {fileID: 171926894} - - {fileID: 1468799206} eyeImage: {fileID: 152092641} memoryRender: {fileID: 1152260725} backToFaceButton: {fileID: 902033654} @@ -3409,6 +3408,7 @@ MonoBehaviour: burnRadiusMax: 22 backSpriteRenderer: {fileID: 1036194065} wrongColorSpriteRenderer: {fileID: 1211051073} + imageSpriteRender: {fileID: 163241097} --- !u!212 &171926895 SpriteRenderer: m_ObjectHideFlags: 0 @@ -5599,11 +5599,12 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f562a781286b6c14bb080f64d5047d3b, type: 3} m_Name: m_EditorClassIdentifier: - targetTransform: {fileID: 0} + targetTransform: {fileID: 818458646} burnRadiusMin: 13 burnRadiusMax: 17 backSpriteRenderer: {fileID: 1181555071} wrongColorSpriteRenderer: {fileID: 55672861} + imageSpriteRender: {fileID: 818458647} --- !u!212 &247366037 SpriteRenderer: m_ObjectHideFlags: 0 @@ -6058,6 +6059,8 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: + - {fileID: 693974690} + - {fileID: 1274771462} - {fileID: 1372381515} - {fileID: 818458646} - {fileID: 299472612} @@ -6540,13 +6543,13 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 299472611} serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0.04666586, w: 0.9989106} - m_LocalPosition: {x: 8.150948, y: 2.0526974, z: 2.952667} - m_LocalScale: {x: 0.5094902, y: 0.5094902, z: 0.50949} + m_LocalRotation: {x: -0, y: -0, z: 0.23277298, w: 0.97253114} + m_LocalPosition: {x: 9.18, y: 0.85, z: 2.952667} + m_LocalScale: {x: 1.0368459, y: 1.0368459, z: 1.0368456} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 267394791} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: -5.349} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 26.921} --- !u!212 &299472613 SpriteRenderer: m_ObjectHideFlags: 0 @@ -7756,7 +7759,7 @@ Transform: serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalScale: {x: 1.3182, y: 1.3182, z: 1.3182} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 783319748} @@ -11321,9 +11324,9 @@ MonoBehaviour: m_EditorClassIdentifier: heatMaterial: {fileID: 2100000, guid: 72b0010e1307b614ebb427b0d8dc54ee, type: 2} Pos: + - {fileID: 1484838014} - {fileID: 1678197549} - {fileID: 962974901} - - {fileID: 1484838014} - {fileID: 1616768533} - {fileID: 1983689271} - {fileID: 190481521} @@ -11709,7 +11712,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!114 &693974689 MonoBehaviour: m_ObjectHideFlags: 0 @@ -11725,7 +11728,7 @@ MonoBehaviour: m_IsGlobal: 1 priority: 0 blendDistance: 0 - weight: 0 + weight: 1 sharedProfile: {fileID: 11400000, guid: 4bae693934d211542b80135b216fecdd, type: 2} --- !u!4 &693974690 Transform: @@ -11735,12 +11738,12 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 693974688} serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 39.944054, y: -0.6026976, z: -2.952667} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 0} + m_Father: {fileID: 267394791} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &696533769 GameObject: @@ -12783,7 +12786,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -32.84, y: 2.654} + m_AnchoredPosition: {x: -34.32, y: 0.58} m_SizeDelta: {x: 2.5, y: 2.5} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &777225789 @@ -14478,7 +14481,7 @@ Transform: serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 7.9750023, y: 8.44, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalScale: {x: 1.3801, y: 1.3801, z: 1.3801} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 522320917} @@ -19682,6 +19685,7 @@ MonoBehaviour: burnRadiusMax: 18 backSpriteRenderer: {fileID: 983645283} wrongColorSpriteRenderer: {fileID: 533663232} + imageSpriteRender: {fileID: 0} --- !u!212 &1271136870 SpriteRenderer: m_ObjectHideFlags: 0 @@ -19750,7 +19754,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!114 &1274771461 MonoBehaviour: m_ObjectHideFlags: 0 @@ -19776,12 +19780,12 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1274771460} serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 39.944054, y: -0.6026976, z: -2.952667} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 0} + m_Father: {fileID: 267394791} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1281870654 GameObject: @@ -21047,6 +21051,7 @@ MonoBehaviour: burnRadiusMax: 22 backSpriteRenderer: {fileID: 795246566} wrongColorSpriteRenderer: {fileID: 2074510898} + imageSpriteRender: {fileID: 299472613} --- !u!212 &1437519564 SpriteRenderer: m_ObjectHideFlags: 0 @@ -21933,7 +21938,7 @@ MonoBehaviour: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1468799204} - m_Enabled: 1 + m_Enabled: 0 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: f562a781286b6c14bb080f64d5047d3b, type: 3} m_Name: @@ -21943,6 +21948,7 @@ MonoBehaviour: burnRadiusMax: 30 backSpriteRenderer: {fileID: 1593142682} wrongColorSpriteRenderer: {fileID: 1635219591} + imageSpriteRender: {fileID: 0} --- !u!212 &1468799207 SpriteRenderer: m_ObjectHideFlags: 0 @@ -22266,7 +22272,7 @@ GameObject: - component: {fileID: 1484838014} - component: {fileID: 1484838015} m_Layer: 0 - m_Name: heatmap + m_Name: UFheatmap m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -22526,7 +22532,7 @@ Transform: serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -5.2700005, y: 6.6349998, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalScale: {x: 1.0808048, y: 1.0808048, z: 1.0808048} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 2115011992} @@ -23660,6 +23666,7 @@ MonoBehaviour: burnRadiusMax: 20 backSpriteRenderer: {fileID: 905842942} wrongColorSpriteRenderer: {fileID: 101672554} + imageSpriteRender: {fileID: 1875449745} --- !u!212 &1589824318 SpriteRenderer: m_ObjectHideFlags: 0 @@ -29154,13 +29161,13 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1875449743} serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -5.0240555, y: 0.042697668, z: 2.952667} - m_LocalScale: {x: 0.5860663, y: 0.5860663, z: 0.5860663} + m_LocalRotation: {x: -0, y: -0, z: -0.9880404, w: 0.15419549} + m_LocalPosition: {x: -5.5, y: 3.42, z: 2.952667} + m_LocalScale: {x: 0.9783731, y: 0.9783731, z: 0.9783731} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 267394791} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: -162.26} --- !u!212 &1875449745 SpriteRenderer: m_ObjectHideFlags: 0 @@ -29391,6 +29398,10 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: UFPanel: {fileID: 1474527767} + FullAscillVolume: {fileID: 267394790} + imageAscillVolume: {fileID: 1372381514} + imageVolume: {fileID: 693974689} + finalVolume: {fileID: 1274771461} --- !u!1 &1935891755 GameObject: m_ObjectHideFlags: 0 @@ -34728,7 +34739,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4214753503693131867, guid: 13f00ab6092291d49a9312e52873d80b, type: 3} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 7037918505330246345, guid: 13f00ab6092291d49a9312e52873d80b, type: 3} propertyPath: field of view @@ -34856,5 +34867,3 @@ SceneRoots: - {fileID: 183765382} - {fileID: 851958693} - {fileID: 267394791} - - {fileID: 693974690} - - {fileID: 1274771462} diff --git a/Assets/Scenes/Persistence.unity b/Assets/Scenes/Persistence.unity index 99a6574db..b0edb4a5f 100644 --- a/Assets/Scenes/Persistence.unity +++ b/Assets/Scenes/Persistence.unity @@ -8104,10 +8104,10 @@ MonoBehaviour: - {fileID: 11400000, guid: 9e3b2c77ad4a9454188d458da2cf0ddd, type: 2} - {fileID: 11400000, guid: 6d49b124127007b48b6881ce33350263, type: 2} - {fileID: 11400000, guid: fe71f935f1f9a52458c994362567a211, type: 2} - runMode: 0 + runMode: 2 firstTalkSo: {fileID: 11400000, guid: 6d49b124127007b48b6881ce33350263, type: 2} testTalkSo: {fileID: 11400000, guid: 10601ce26230723479d875a630f15732, type: 2} - saveFileName: + saveFileName: "PeipeiDay2_\u7B2C\u4E00\u6B21\u53D1\u70ED" --- !u!4 &719228339 Transform: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/VFXtest/想象效果.asset b/Assets/Scenes/VFXtest/想象效果.asset index ebe938d1b..4cdf7ae13 100644 --- a/Assets/Scenes/VFXtest/想象效果.asset +++ b/Assets/Scenes/VFXtest/想象效果.asset @@ -100,6 +100,109 @@ MonoBehaviour: m_Mode: m_OverrideState: 1 m_Value: 2 +--- !u!114 &-5474144875945555693 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ba41c240f778d164abc40f8dca90fc16, type: 3} + m_Name: AsciiVol + m_EditorClassIdentifier: + active: 0 + m_Scale: + m_OverrideState: 1 + m_Value: 0.804 + m_Ascii: + m_OverrideState: 1 + m_Value: {r: 1, g: 0, b: 0.019174099, a: 1} + m_Mapping: + m_OverrideState: 1 + m_Value: + _curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.016479492 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + _pixels: + - {r: 0.016479492, g: 0.016479492, b: 0.016479492, a: 0.016479492} + - {r: 0.019483767, g: 0.019483767, b: 0.019483767, a: 0.019483767} + - {r: 0.028232481, g: 0.028232481, b: 0.028232481, a: 0.028232481} + - {r: 0.04232946, g: 0.04232946, b: 0.04232946, a: 0.04232946} + - {r: 0.061378546, g: 0.061378546, b: 0.061378546, a: 0.061378546} + - {r: 0.08498357, g: 0.08498357, b: 0.08498357, a: 0.08498357} + - {r: 0.112748355, g: 0.112748355, b: 0.112748355, a: 0.112748355} + - {r: 0.14427674, g: 0.14427674, b: 0.14427674, a: 0.14427674} + - {r: 0.17917256, g: 0.17917256, b: 0.17917256, a: 0.17917256} + - {r: 0.21703963, g: 0.21703963, b: 0.21703963, a: 0.21703963} + - {r: 0.25748178, g: 0.25748178, b: 0.25748178, a: 0.25748178} + - {r: 0.30010286, g: 0.30010286, b: 0.30010286, a: 0.30010286} + - {r: 0.3445067, g: 0.3445067, b: 0.3445067, a: 0.3445067} + - {r: 0.39029714, g: 0.39029714, b: 0.39029714, a: 0.39029714} + - {r: 0.43707803, g: 0.43707803, b: 0.43707803, a: 0.43707803} + - {r: 0.48445314, g: 0.48445314, b: 0.48445314, a: 0.48445314} + - {r: 0.5320263, g: 0.5320263, b: 0.5320263, a: 0.5320263} + - {r: 0.5794015, g: 0.5794015, b: 0.5794015, a: 0.5794015} + - {r: 0.62618226, g: 0.62618226, b: 0.62618226, a: 0.62618226} + - {r: 0.67197275, g: 0.67197275, b: 0.67197275, a: 0.67197275} + - {r: 0.7163766, g: 0.7163766, b: 0.7163766, a: 0.7163766} + - {r: 0.7589977, g: 0.7589977, b: 0.7589977, a: 0.7589977} + - {r: 0.7994399, g: 0.7994399, b: 0.7994399, a: 0.7994399} + - {r: 0.837307, g: 0.837307, b: 0.837307, a: 0.837307} + - {r: 0.87220275, g: 0.87220275, b: 0.87220275, a: 0.87220275} + - {r: 0.90373117, g: 0.90373117, b: 0.90373117, a: 0.90373117} + - {r: 0.9314959, g: 0.9314959, b: 0.9314959, a: 0.9314959} + - {r: 0.9551009, g: 0.9551009, b: 0.9551009, a: 0.9551009} + - {r: 0.97415006, g: 0.97415006, b: 0.97415006, a: 0.97415006} + - {r: 0.9882471, g: 0.9882471, b: 0.9882471, a: 0.9882471} + - {r: 0.9969956, g: 0.9969956, b: 0.9969956, a: 0.9969956} + - {r: 1, g: 1, b: 1, a: 1} + m_Image: + m_OverrideState: 1 + m_Value: {r: 0, g: 0, b: 0, a: 1} + m_Solid: + m_OverrideState: 1 + m_Value: 1 + m_Gradient: + m_OverrideState: 1 + m_Value: {fileID: 2800000, guid: a4e4b50799621d14faeade24b5182c49, type: 3} + m_Depth: + m_OverrideState: 1 + m_Value: 3 + m_Fps: + m_OverrideState: 1 + m_Value: 17 + m_Noise: + m_OverrideState: 1 + m_Value: 3 + m_Palette: + m_OverrideState: 1 + m_Value: {fileID: 2800000, guid: 375120ba5ec0f1d4eaa7f761d1a3d758, type: 3} + m_Impact: + m_OverrideState: 1 + m_Value: 1 --- !u!114 &11400000 MonoBehaviour: m_ObjectHideFlags: 0 @@ -118,6 +221,7 @@ MonoBehaviour: - {fileID: 4765057437051461016} - {fileID: 5229455696092315415} - {fileID: 3625888515786733794} + - {fileID: -5474144875945555693} --- !u!114 &3625888515786733794 MonoBehaviour: m_ObjectHideFlags: 3 @@ -130,7 +234,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 96468967439741488ad1b1af1ab44b9b, type: 3} m_Name: ScanlinesVol m_EditorClassIdentifier: - active: 1 + active: 0 m_Intensity: m_OverrideState: 1 m_Value: 0.405 @@ -173,7 +277,7 @@ MonoBehaviour: m_Value: -0.051 _Split: m_OverrideState: 1 - m_Value: 1 + m_Value: 0.46 _Sat: m_OverrideState: 1 m_Value: 0.802 diff --git a/Assets/Scenes/VFXtest/最终效果 Profile.asset b/Assets/Scenes/VFXtest/最终效果 Profile.asset index b7ec54fd4..479f87a03 100644 --- a/Assets/Scenes/VFXtest/最终效果 Profile.asset +++ b/Assets/Scenes/VFXtest/最终效果 Profile.asset @@ -94,7 +94,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 2aebac967aa993140ab1982d43b8450a, type: 3} m_Name: GlitchVol m_EditorClassIdentifier: - active: 0 + active: 1 _weight: m_OverrideState: 1 m_Value: 0.561 diff --git a/Assets/Scripts/FixSystem/HeatMap/HeatTest.shader b/Assets/Scripts/FixSystem/HeatMap/HeatTest.shader index 5a23f50e0..aaa51327d 100644 --- a/Assets/Scripts/FixSystem/HeatMap/HeatTest.shader +++ b/Assets/Scripts/FixSystem/HeatMap/HeatTest.shader @@ -4,9 +4,9 @@ Shader "Unlit/HeatTest" { //_MainTex ("Texture", 2D) = "white" {} _RampTexture ("_RampTexture", 2D) = "white" {} + _UFtexture ("_UFtexture", 2D) = "white" {} _Memorytexture ("_Memorytexture", 2D) = "white" {} _Eyetexture ("_Eyetexture", 2D) = "white" {} - _UFtexture ("_UFtexture", 2D) = "white" {} _Emotexture ("_Emotexture", 2D) = "white" {} _Logictexture ("_Logictexture", 2D) = "white" {} _Speaktexture ("_Speaktexture", 2D) = "white" {} @@ -48,9 +48,9 @@ Shader "Unlit/HeatTest" sampler2D _Noise; uniform float4 _Points[7]; // (x, y) = center z = tempture uniform float4 _Properties[7]; // (x,y) = boxsize + sampler2D _UFtexture; sampler2D _Memorytexture; sampler2D _Eyetexture ; - sampler2D _UFtexture; sampler2D _Emotexture; sampler2D _Logictexture ; sampler2D _Speaktexture; @@ -111,11 +111,11 @@ float remap(float x, float a, float b, float c, float d) float GetAlphaForTexture(int j, float2 localPos) { if (j == 0) - return tex2D(_Memorytexture, localPos).a; - else if (j == 1) - return tex2D(_Eyetexture, localPos).a; - else if (j == 2) return tex2D(_UFtexture, localPos).a; + else if (j == 1) + return tex2D(_Memorytexture, localPos).a; + else if (j == 2) + return tex2D(_Eyetexture, localPos).a; else if (j == 3) return tex2D(_Emotexture, localPos).a; else if (j == 4) diff --git a/Assets/Scripts/FixSystemNew/FixStateMachine.cs b/Assets/Scripts/FixSystemNew/FixStateMachine.cs index f80c48705..75456e4f3 100644 --- a/Assets/Scripts/FixSystemNew/FixStateMachine.cs +++ b/Assets/Scripts/FixSystemNew/FixStateMachine.cs @@ -247,6 +247,7 @@ namespace AibisDream.FixSystem float duration = 0.5f; var bodyModuleSystem = FixSystemCenter.SystemDic.Get(); var UFSystem = FixSystemCenter.SystemDic.Get(); + var EyeSystem = FixSystemCenter.SystemDic.Get(); // 先切BodyModule if (!CameraKit.Instance.EqualToCameraState(CameraEnum.BodyModule)) { @@ -261,13 +262,16 @@ namespace AibisDream.FixSystem yield return CameraKit.Instance.SwitchCamera(CameraEnum.UF); yield return MainUIController.Instance.FadeInSync(duration); UFSystem.OpenUFView(); + EyeSystem.OnEnter(); yield return MainUIController.Instance.FadeOutSync(duration); } public IEnumerator Exit() { + var UFSystem = FixSystemCenter.SystemDic.Get(); var eyeSystem = FixSystemCenter.SystemDic.Get(); eyeSystem.OnExit(); + UFSystem.CloseUFView(); yield return null; } } diff --git a/Assets/Scripts/MiniGame/Peipei/UF/UFSystem.cs b/Assets/Scripts/MiniGame/Peipei/UF/UFSystem.cs index 6366d63d4..e3317747b 100644 --- a/Assets/Scripts/MiniGame/Peipei/UF/UFSystem.cs +++ b/Assets/Scripts/MiniGame/Peipei/UF/UFSystem.cs @@ -1,38 +1,184 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using AibisDream; using AibisDream.FixSystem; using AibisDream.Framework; using Cinemachine; - +using UnityEngine.Rendering; +using Yarn.Unity; +using DG.Tweening; +using VolFx; +using System.Drawing.Text; // 引入 DoTween 命名空间 public class UFSystem : MonoBehaviour { // Start is called before the first frame update private GameObject _UFCover; private GameObject _UFModule; + private EyeSystem eyeSystem; + public GameObject UFPanel; + private bool isLoopImage = false; + + [SerializeField] private Volume FullAscillVolume; + [SerializeField] private Volume imageAscillVolume; + [SerializeField] private Volume imageVolume; + [SerializeField] private Volume finalVolume; + + + private AsciiVol ascii; + + private Tween scaleTween; // 存储 Tween 动画 + private void Awake() { FixSystemCenter.SystemDic.Register(this); var virtualCam = transform.Find("UF Camera").GetComponent(); CameraKit.Instance.RegisterCamera(CameraEnum.UF, virtualCam); + eyeSystem = FindObjectOfType(); + } + public void TweenWeight(Volume postProcessingVolume, float targetWeight, float duration) + { + // 动态调整权重 + DOTween.To(() => postProcessingVolume.weight, x => postProcessingVolume.weight = x, targetWeight, duration); + } + [YarnCommand("UFEffect_ImageIn")] + public IEnumerator UFImageIn(float duration = 1.5f) + { + if (eyeSystem.CurrentTarget != null) + { + AudioManager.RandomPlayInteraction("colorimagine"); + eyeSystem.CurrentTarget.ImageIn(duration); + TweenWeight(imageVolume, 1, duration); + } + yield return new WaitForSeconds(duration); + } + [YarnCommand("UFEffect_ImageOut")] + public IEnumerator UFImageOut(float duration = 1.5f) + { + if (eyeSystem.CurrentTarget != null) + { + eyeSystem.CurrentTarget.ImageOut(duration); + TweenWeight(imageVolume, 0, duration); + TweenWeight(imageAscillVolume, 1, duration); + TweenWeight(finalVolume, 0, duration); + AudioManager.RandomPlayInteraction("colorimagine"); + } + yield return new WaitForSeconds(0); + } + // [YarnCommand("UFEffect_Processing")] + // public IEnumerator UFProcessing(EyeTarget eyeSystem.CurrentTarget) + // { + // if (eyeSystem.CurrentTarget != null) + // { + // TweenWeight(imageVolume,1,1); + // TweenWeight(imageAscillVolume,1,1); + // TweenWeight(finalVolume,0,1); + // AudioManager.RandomPlayInteraction("colorimagine"); + // } + // yield return new WaitForSeconds(1); + // } + // [YarnCommand("UFEffect_ImageOutFinfish")] + // public IEnumerator UFImageOutFinfish(float duration=1.5f) + // { + // if (eyeSystem.CurrentTarget != null) + // { + // AudioManager.RandomPlayInteraction("colorimagine"); + // eyeSystem.CurrentTarget.ImageOut(2); + // TweenWeight(imageVolume,0,2); + // } + // yield return new WaitForSeconds(2); + // } + [YarnCommand("UFEffect_ImageFinish")] + public IEnumerator UFImageFinish(float duration = 1.5f) + { + if (eyeSystem.CurrentTarget != null) + { + AudioManager.RandomPlayInteraction("colorimagine"); + TweenWeight(imageVolume, 0, duration); + TweenWeight(imageAscillVolume, 0, duration); + TweenWeight(finalVolume, 1, duration); + } + yield return new WaitForSeconds(duration); } + + [YarnCommand("StartUFEffect_loop")] + public void UFImageLoop() + { + StartCoroutine(UFImageLoopProcess()); + } + [YarnCommand("StopUFEffect_loop")] + public void StopUFImageLoop() + { + isLoopImage = false; + } + [YarnCommand("UFEffect_ImageAll")] + public void ImageAll() + { + UFImageIn(1); + foreach (EyeTarget target in eyeSystem.Targets) + { + target.ImageIn(1); + } + scaleTween = DOTween.To(() => 0f, t => + { + // 根据 t(0 到 1 的变化)更新多个值 + imageVolume.weight = Mathf.Lerp(0f, 1f, t); // 例如:imageVolume 的 weight + imageAscillVolume.weight = Mathf.Lerp(0f, 1f, t); // 假设 saturation 是另一个值 + finalVolume.weight = Mathf.Lerp(1f, 0f, t); // 假设 contrast 是另一个值 + }, 1f, 1f) + .SetEase(Ease.InOutSine) // 平滑缓动 + .SetLoops(-1, LoopType.Yoyo); // 无限循环 + } + + public IEnumerator UFImageLoopProcess() + { + int index = 0; + isLoopImage = true; + while (isLoopImage) // 无限循环 + { + eyeSystem.StartCoroutine(eyeSystem.SetTargetCoroutine(eyeSystem.Targets[index].name, false)); + yield return new WaitForSeconds(0.5f); + StartCoroutine(UFImageIn(0.5f)); + eyeSystem.Targets[index].ImageIn(0.5f); + yield return new WaitForSeconds(0.5f); + StartCoroutine(UFImageFinish(0.5f)); + yield return new WaitForSeconds(1f); + eyeSystem.Targets[index].ImageOut(0.5f); + StartCoroutine(UFImageOut(0.5f)); + index++; + // 如果到达列表末尾,则回到开头 + if (index >= eyeSystem.Targets.Count) + { + index = 0; + } + //yield return new WaitForSeconds(1f); // 每隔1秒打印一次 + } + } public void OpenUFView() { - if (!UFPanel.activeInHierarchy) + if (!FullAscillVolume.gameObject.activeInHierarchy) { - UFPanel.SetActive(true); + FullAscillVolume.gameObject.SetActive(true); + imageAscillVolume.weight = 1; + imageVolume.weight = 0; + finalVolume.weight = 0; + } } public void CloseUFView() { - if (UFPanel.activeInHierarchy) + if (FullAscillVolume.gameObject.activeInHierarchy) { - UFPanel.SetActive(false); + FullAscillVolume.gameObject.SetActive(false); + imageAscillVolume.weight = 1; + imageVolume.weight = 0; + finalVolume.weight = 0; + //scaleTween.Kill(); } }