public GameTimer(int timeSeed,GameTimerCallback updateCallback, GameTimerCallback endCallback) { TimeLeft = TimeSpan.FromMilliseconds(timeSeed); UpdateCallback = updateCallback; EndCallback = endCallback; }
public GameTimer SetTimer(int time, GameTimerCallback updateCallback, GameTimerCallback endCallback) { var newTimer = new GameTimer(time, updateCallback, endCallback); Timers.Add(newTimer); return newTimer; }