Class ClockEvent
Abstract base class for every ScyllaEvent published by a ScyllaClock. Each concrete subclass corresponds to one ClockEventKind.
Inheritance
ClockEvent
Inherited Members
Namespace: Scylla.Core.Time
Assembly: ScyllaCore.dll
Syntax
public abstract class ClockEvent : ScyllaEvent
Remarks
The payload carries the source clock's ID, the date before and after the change, and a flag indicating whether the clock is running backwards. Subscribers can pattern-match on the concrete subclass type for compile-time dispatch or read Kind for runtime dispatch.
Constructors
ClockEvent(string, GameDate, GameDate, bool)
Initializes the common payload for every clock event.
Declaration
protected ClockEvent(string clockID, GameDate before, GameDate after, bool isReversing)
Parameters
| Type | Name | Description |
|---|---|---|
| string | clockID | |
| GameDate | before | |
| GameDate | after | |
| bool | isReversing |
Properties
After
Resolved date after the state change.
Declaration
public GameDate After { get; }
Property Value
| Type | Description |
|---|---|
| GameDate |
Before
Resolved date prior to the state change.
Declaration
public GameDate Before { get; }
Property Value
| Type | Description |
|---|---|
| GameDate |
ClockID
The originating clock's ClockID.
Declaration
public string ClockID { get; }
Property Value
| Type | Description |
|---|---|
| string |
IsReversing
True when the clock's effective rate was negative when the change happened.
Declaration
public bool IsReversing { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Kind
Discriminator identifying which concrete subclass this event is.
Declaration
public abstract ClockEventKind Kind { get; }
Property Value
| Type | Description |
|---|---|
| ClockEventKind |