Struct RailSnapshot
Immutable representation of the current rail movement state at a point in time.
Assembly: Serenity.GameRail.Domain.dll
Syntax
public readonly struct RailSnapshot : IEquatable<RailSnapshot>
Constructors
RailSnapshot(RailId, RailProgress, int)
Creates a new RailSnapshot.
Declaration
public RailSnapshot(RailId railId, RailProgress progress, int nodeCount)
Parameters
| Type |
Name |
Description |
| RailId |
railId |
The rail identity.
|
| RailProgress |
progress |
The current progress.
|
| int |
nodeCount |
The total number of nodes in the rail path.
|
Fields
NodeCount
The total number of nodes in the rail path.
Declaration
public readonly int NodeCount
Field Value
Progress
The current progress along the rail.
Declaration
public readonly RailProgress Progress
Field Value
RailId
The identity of the rail this snapshot belongs to.
Declaration
public readonly RailId RailId
Field Value
Methods
Equals(RailSnapshot)
Declaration
public bool Equals(RailSnapshot other)
Parameters
Returns
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
operator ==(RailSnapshot, RailSnapshot)
Declaration
public static bool operator ==(RailSnapshot left, RailSnapshot right)
Parameters
Returns
operator !=(RailSnapshot, RailSnapshot)
Declaration
public static bool operator !=(RailSnapshot left, RailSnapshot right)
Parameters
Returns
Implements