示例#1
0
        public override void SayTime(int sec)
        {
            int minutes = sec / 60;
            int seconds = sec % 60;

            if (minutes > 0)
            {
                SoundsQueuePlayer.AddSound(m_sndNormal[minutes]);
                SoundsQueuePlayer.AddSound(minutes == 1 ? m_sndMinute : m_sndMinutes);
            }
            if (seconds > 0)
            {
                if (seconds <= 19)
                {
                    SoundsQueuePlayer.AddSound(m_sndNormal[seconds]);
                }
                else
                {
                    int restSec = seconds % 10;
                    if (restSec > 0)
                    {
                        SoundsQueuePlayer.AddSound(m_sndNormal[restSec]);
                        SoundsQueuePlayer.AddSound(m_sndUnd);
                    }
                    int mulTen = (seconds / 10) * 10;
                    SoundsQueuePlayer.AddSound(m_sndNormal[mulTen]);
                }
                SoundsQueuePlayer.AddSound(m_sndSeconds);
            }
        }
示例#2
0
 public void SayGo()
 {
     SoundsQueuePlayer.AddSound(m_sndGo);
 }
示例#3
0
 public void SayFinish()
 {
     SoundsQueuePlayer.AddSound(m_sndFinish);
 }
示例#4
0
 public void SayCountdown(int sec)
 {
     SoundsQueuePlayer.AddSound(countdown[sec]);
 }