namespace OECS; /// /// Describes the kind of tick being processed. /// public enum TickType { /// /// A timed tick, carrying a delta time (e.g., frame-based update). /// Timed, /// /// A logical tick, carrying no delta time (e.g., fixed-step simulation). /// Logical } /// /// Data passed to systems during a tick. /// public readonly struct Tick { /// /// The kind of tick. /// public TickType Type { get; } /// /// The elapsed time since the last tick, in seconds. /// Always 0 for logical ticks. /// public float DeltaTime { get; } private Tick(TickType type, float deltaTime) { Type = type; DeltaTime = deltaTime; } /// /// Creates a timed tick with the given delta time. /// public static Tick Timed(float deltaTime) => new(TickType.Timed, deltaTime); /// /// Creates a logical tick (no delta time). /// public static Tick Logical() => new(TickType.Logical, 0f); }