コード例 #1
0
 /// <summary>
 /// Decrement player's count down. Called at every timer tick.
 /// </summary>
 /// <param name="source"></param>
 /// <param name="e"></param>
 private void DecrementTime(Object source, ElapsedEventArgs e)
 {
     if (Time - 1 < 0)
     {
         timer.Stop();
         game.GameOver("A player's time has expired.");
     }
     Time--;
 }