using UnityEngine; using UnityEngine.UI; namespace vnxbqy.UI { public class NewYearCeremonyCoolTime : MonoBehaviour { [SerializeField] Text m_Time; private void OnEnable() { GlobalTimeEvent.Instance.secondEvent += RefreshSecond; RefreshSecond(); } private void OnDisable() { GlobalTimeEvent.Instance.secondEvent -= RefreshSecond; } private void RefreshSecond() { int seconds = OperationTimeHepler.Instance.GetOperationSurplusTime(Operation.NewYearFairyCeremony); if (seconds > 0) { m_Time.text = StringUtility.Contact("", TimeUtility.SecondsToHMS(seconds), ""); } else { m_Time.text = UIHelper.AppendColor(TextColType.Red, Language.Get("XMZZ110")); } } } }