Esempio n. 1
0
 private void OnTick()
 {
     lastTickEvent.Canceled = true;
     lastTickEvent = new TickEventArgs(TimeLimit - ElapsedTime);
     Tick(this, lastTickEvent);
 }
Esempio n. 2
0
 public GameTimer(int timeLimit)
 {
     this.TimeLimit = timeLimit;
     this.secondTimer = new Timer(OnTick);
     this.lastTickEvent = new TickEventArgs(0);
 }