Petition-to-the-Gods-V3/Assets/Scripts/Server/ServerWorkTopRightScore.cs
chiyu.lin 4ede3ccfa6 fix Q15
資料移到GlobalData
串接星星與回覆,調整星星顯示與觸發
2025-11-19 17:40:43 +08:00

48 lines
850 B
C#

using TMPro;
using UnityEngine;
public class ServerWorkTopRightScore : MonoBehaviour
{
public static ServerWorkTopRightScore Instance;
public TMP_Text Val1;
public TMP_Text Val2;
public TMP_Text Val3;
private void Awake()
{
Instance = this;
}
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public void UpdateScoreVals()
{
if (Val1)
{
Val1.text = GlobalData.VIRTUE_SCORE.ToString();
}
if (Val2)
{
Val2.text = GlobalData.KARMA_SCORE.ToString();
}
if (Val3)
{
Val3.text = GlobalData.SINCERITY_SCORE.ToString();
}
}
}