You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

40 lines
511 B

  1. using System;
  2. namespace SUISSEngine
  3. {
  4. public abstract class Timer
  5. {
  6. public Timer(Action action)
  7. {
  8. this._action = action;
  9. this._cancelled = false;
  10. }
  11. public Action Action
  12. {
  13. get
  14. {
  15. return this._action;
  16. }
  17. }
  18. public bool IsCancelled
  19. {
  20. get
  21. {
  22. return this._cancelled;
  23. }
  24. }
  25. public virtual void Cancel()
  26. {
  27. this._cancelled = true;
  28. this._action = null;
  29. }
  30. protected Action _action;
  31. protected bool _cancelled;
  32. }
  33. }