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