Ejemplo n.º 1
0
 /// <summary>
 /// Updates both the timers - if the sound timer reaches
 /// 0 in this function, tells the display class to beep.
 /// </summary>
 private void UpdateTimers()
 {
     if (delay_timer > 0)
     {
         delay_timer--;
     }
     if (sound_timer > 0)
     {
         sound_timer--;
         if (sound_timer == 0)
         {
             display.Beep();
         }
     }
 }