Occurrence.cs 928 B

12345678910111213141516171819202122232425262728
  1. namespace Chronos
  2. {
  3. /// <summary>
  4. /// An event anchored at a specified moment in time composed of two actions: one when time goes forward, and another when time goes backward. The latter is most often used to revert the former.
  5. /// </summary>
  6. public abstract class Occurrence
  7. {
  8. /// <summary>
  9. /// The time in seconds on the parent timeline at which the occurrence will happen.
  10. /// </summary>
  11. public float time { get; internal set; }
  12. /// <summary>
  13. /// Indicates whether this occurrence can happen more than once; that is, whether it will stay on the timeline once it has been rewound.
  14. /// </summary>
  15. public bool repeatable { get; internal set; }
  16. /// <summary>
  17. /// The action that is executed when time goes forward.
  18. /// </summary>
  19. public abstract void Forward();
  20. /// <summary>
  21. /// The action that is executed when time goes backward.
  22. /// </summary>
  23. public abstract void Backward();
  24. }
  25. }