From 00c7124b9396aa83f95cccb330946c790e9a0043 Mon Sep 17 00:00:00 2001 From: Ding Yuntian <1491671119@qq.com> Date: Wed, 20 Aug 2025 20:46:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=9C=B0=E9=BC=A0=E5=9B=9E=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Resources/Yarn/Fiction_Yingli1/EventNode.yarn | 11 +++++++++++ .../Scripts/FixSystemNew/WhackMole/WhackMoleSystem.cs | 5 +++++ Assets/Scripts/Game Loop/StorageSystem.cs | 3 +-- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Assets/Resources/Yarn/Fiction_Yingli1/EventNode.yarn b/Assets/Resources/Yarn/Fiction_Yingli1/EventNode.yarn index 7d0aeff41..23ee66df3 100644 --- a/Assets/Resources/Yarn/Fiction_Yingli1/EventNode.yarn +++ b/Assets/Resources/Yarn/Fiction_Yingli1/EventNode.yarn @@ -60,3 +60,14 @@ position: 480,-2840 --- <> === + + +title: 打地鼠结束 +--- +// 亮起总数 $whackRes.totalMoleNum +// 成功击中$whackRes.hitMoleNum + +// 流水线总数$whackRes.totalProductNum +// 流水线成功数$whackRes.successNum +// 流水线失败数$whackRes.failNum +=== diff --git a/Assets/Scripts/FixSystemNew/WhackMole/WhackMoleSystem.cs b/Assets/Scripts/FixSystemNew/WhackMole/WhackMoleSystem.cs index 2f40a1c48..b57ac866c 100644 --- a/Assets/Scripts/FixSystemNew/WhackMole/WhackMoleSystem.cs +++ b/Assets/Scripts/FixSystemNew/WhackMole/WhackMoleSystem.cs @@ -58,12 +58,17 @@ namespace AibisDream.FixSystem _whackMoleHandler.EndWhackGame(); var whackRes = _whackMoleHandler.res; Debug.Log($"结果:共计{whackRes.totalMoleNum}个,成功击中{whackRes.hitMoleNum}个"); + StorageSystem.Instance.SetValue("$whackRes.totalMoleNum", whackRes.totalMoleNum); + StorageSystem.Instance.SetValue("$whackRes.hitMoleNum", whackRes.hitMoleNum); // 流水线结果 if (_data.HasPipeline()) { var pipelineRes = pipelineSystem.res; Debug.Log( $"流水线结果:共计{pipelineRes.totalProductNum}个,成功{pipelineRes.successNum}个,失败{pipelineRes.failNum}个"); + StorageSystem.Instance.SetValue("$whackRes.totalProductNum", pipelineRes.totalProductNum); + StorageSystem.Instance.SetValue("$whackRes.successNum", pipelineRes.successNum); + StorageSystem.Instance.SetValue("$whackRes.failNum", pipelineRes.failNum); } // 结束 DialogController.Instance?.StartDialogNode("打地鼠结束"); diff --git a/Assets/Scripts/Game Loop/StorageSystem.cs b/Assets/Scripts/Game Loop/StorageSystem.cs index 2cffd601a..ef1f9001c 100644 --- a/Assets/Scripts/Game Loop/StorageSystem.cs +++ b/Assets/Scripts/Game Loop/StorageSystem.cs @@ -255,8 +255,7 @@ namespace AibisDream } } } - - + public void Load(string savePath) { // 先将存档文件转为JObject