Ejemplo n.º 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);
            }
        }
Ejemplo n.º 2
0
 public void SayGo()
 {
     SoundsQueuePlayer.AddSound(m_sndGo);
 }
Ejemplo n.º 3
0
 public void SayFinish()
 {
     SoundsQueuePlayer.AddSound(m_sndFinish);
 }
Ejemplo n.º 4
0
 public void SayCountdown(int sec)
 {
     SoundsQueuePlayer.AddSound(countdown[sec]);
 }