24 lines
771 B
C#
24 lines
771 B
C#
using UnityEngine;
|
|
using TMPro;
|
|
|
|
// 顯示這次已記錄的回合數,方便貢獻者自己平衡無輔助 / 有輔助
|
|
// 上次當機沒打包的回合會在這次關遊戲時一起打包,也一併提示
|
|
public class RoundCounter : MonoBehaviour
|
|
{
|
|
[Header("UI 參照")]
|
|
[Tooltip("Text (TMP)")]
|
|
public TextMeshProUGUI counterText;
|
|
|
|
void Start()
|
|
{
|
|
if (counterText == null) return;
|
|
|
|
string text = $"回合數 : 無輔助 {SessionStorage.NoAssistRounds} 回, 有輔助 {SessionStorage.AssistRounds} 回";
|
|
if (SessionStorage.RecoveredRounds > 0)
|
|
{
|
|
text += $"\n(上次未打包的 {SessionStorage.RecoveredRounds} 回合會在關閉遊戲時一起打包)";
|
|
}
|
|
counterText.text = text;
|
|
}
|
|
}
|