From 40e56630e631cd2ef1f3ac29bfa140db137b2e50 Mon Sep 17 00:00:00 2001 From: chiyulin0314 Date: Thu, 20 Nov 2025 04:41:13 +0800 Subject: [PATCH] =?UTF-8?q?fix=20Q25=20=E9=81=8A=E6=88=B21,=E9=81=8A?= =?UTF-8?q?=E6=88=B22=E7=9A=84=E5=A0=B1=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Server/ServerGameTalkingPanel.cs | 3 +++ Assets/Scripts/Server/ServerGameTypingPanel.cs | 3 +++ Assets/Scripts/Utils/CustomerReportSystem.cs | 7 ++++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/Server/ServerGameTalkingPanel.cs b/Assets/Scripts/Server/ServerGameTalkingPanel.cs index 002c17c..0f24469 100644 --- a/Assets/Scripts/Server/ServerGameTalkingPanel.cs +++ b/Assets/Scripts/Server/ServerGameTalkingPanel.cs @@ -217,6 +217,9 @@ public class ServerGameTalkingPanel : MonoBehaviour { playChatText.text = ""; statusText.text = "倒計時 : " + gameTimeCountdownSecVal.ToString() + "s"; + //打開時更新數值 + int[] scores = { GlobalData.VIRTUE_SCORE, GlobalData.KARMA_SCORE, GlobalData.SINCERITY_SCORE }; + customReportScript.SetAllCustomerValues(scores); StartCoroutine(GameTimeCountdown()); } } diff --git a/Assets/Scripts/Server/ServerGameTypingPanel.cs b/Assets/Scripts/Server/ServerGameTypingPanel.cs index d895982..e5e140b 100644 --- a/Assets/Scripts/Server/ServerGameTypingPanel.cs +++ b/Assets/Scripts/Server/ServerGameTypingPanel.cs @@ -65,6 +65,9 @@ public class ServerGameTypingPanel : MonoBehaviour if (step == 3) { checkText.text = result; + //打開時更新數值 + int[] scores = { GlobalData.VIRTUE_SCORE, GlobalData.KARMA_SCORE, GlobalData.SINCERITY_SCORE }; + customReportScript.SetAllCustomerValues(scores); StartCoroutine(GameTimeCountdown()); } } diff --git a/Assets/Scripts/Utils/CustomerReportSystem.cs b/Assets/Scripts/Utils/CustomerReportSystem.cs index 8e35aea..c4b9b21 100644 --- a/Assets/Scripts/Utils/CustomerReportSystem.cs +++ b/Assets/Scripts/Utils/CustomerReportSystem.cs @@ -57,9 +57,14 @@ public class CustomerReportSystem : MonoBehaviour // 私有變數 private int[] customerValues = new int[3]; + private void Awake() + { + //改在Awake時設定預設 + InitializeCustomerReport(); + } + private void Start() { - InitializeCustomerReport(); SetupEventListeners(); UpdateCustomerValueDisplays(); }