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(); }