using System.Collections; using TMPro; using UnityEngine; using UnityEngine.UI; using UnityEngine.Video; public class ServerGameSticksPanel : MonoBehaviour { public static ServerGameSticksPanel Instance; private IncenseGameManager gameManager; private CustomerReportSystem customReportScript; private void Awake() { Instance = this; gameManager = gameObject.GetComponentInChildren(includeInactive: true); customReportScript = gameObject.GetComponentInChildren(includeInactive: true); } // Start is called once before the first execution of Update after the MonoBehaviour is created void Start() { gameManager.OnCountdownFinished = OnCountdownFinished; customReportScript.OnCustomerReportConfirmed = OnCustomerReportConfirmed; } private void OnCountdownFinished() { //倒數時間到,直接跳轉頁面 if (ServerWorkSceneController.Instance) { ServerWorkSceneController.Instance.processStep(17); } } private void OnCustomerReportConfirmed(int[] values) { if (values.Length < 3) { return; } if (ServerWorkTopRightScore.Instance == null) { return; } GlobalData.VIRTUE_SCORE = values[0]; GlobalData.KARMA_SCORE = values[1]; GlobalData.SINCERITY_SCORE = values[2]; ServerWorkTopRightScore.Instance.UpdateScoreVals(); //跳轉頁面 if (ServerWorkSceneController.Instance) { ServerWorkSceneController.Instance.processStep(17); } } public void OnReceivedResult(int angle) { //更新角度 gameManager.SetReceivedAngle(angle); } // Update is called once per frame void Update() { } }