示例#1
0
    private void RefreshTextGroupShow()
    {
        FormatTime totalFt = TimeUtils.GetFormatTime(DataModel.instance.totalTime);

        totalTime.text  = string.Format("{0}小时{1}分钟", totalFt.hor, totalFt.min);
        interTime.text  = string.Format("{0}分钟", (int)DataModel.instance.interMin);
        totalCount.text = string.Format("{0}次", DataModel.instance.timeList.Count);
        float standardSec = DataModel.instance.interMin * 60;
        int   validNum    = 0;

        for (int i = 0, imax = DataModel.instance.timeList.Count; i < imax; ++i)
        {
            if (DataModel.instance.timeList[i] >= standardSec)
            {
                validNum++;
            }
        }

        validCount.text = string.Format("{0}次", validNum);
    }
示例#2
0
        private void InitializeLevelComplete()
        {
            string record = string.Empty;

            if (LevelManager.IsNewRecord())
            {
                record = LevelManager.GetCurrentLevelTimeAsString();
            }
            else
            {
                record = LevelManager.GetCurrentLevelRecordAsString();
            }

            m_currentRecord?.SetText(FormatTime.FormatEndLevelRecord(record));

            m_yourTimeText?.SetText(FormatTime.FormatEndLevelTime(LevelManager.GetCurrentLevelTimeAsString()));
            m_newRecordContainer?.SetActive(LevelManager.IsNewRecord());

            SetLevelName();

            m_container?.SetActive(true);
            m_pop.PlayPopIn();
        }
示例#3
0
 private void SetTime()
 {
     m_timerText?.SetText(FormatTime.FormatLevelTime(m_timer));
 }
示例#4
0
 public static string GetCurrentLevelTimeAsString()
 {
     return(FormatTime.FormatLevelTime(m_currentLevelTime));
 }