Petition-to-the-Gods-V3/Assets/Scripts/Server/ServerGameSticksPanel.cs
chiyulin0314 40ce37edff fix Q25
改為CustomerReportSystem開啟時更新數值
同步遊戲3的報表
2025-11-20 05:17:04 +08:00

42 lines
1.1 KiB
C#

using System.Collections;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Video;
public class ServerGameSticksPanel : MonoBehaviour
{
public static ServerGameSticksPanel Instance;
private CustomerReportSystem customReportScript;
private void Awake()
{
Instance = this;
customReportScript = gameObject.GetComponentInChildren<CustomerReportSystem>(includeInactive: true);
}
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
customReportScript.OnCustomerReportConfirmed = OnCustomerReportConfirmed;
}
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();
}
// Update is called once per frame
void Update()
{
}
}