示例#1
0
 // HACK: This is internal and not private for Player to be able to reconstruct it from state.
 public RoadMovementComponent(Road road, Distance progress, MovementDirection direction)
 {
     Road      = road;
     Progress  = progress;
     Direction = direction;
 }
示例#2
0
 public static Distance GetDistanceFor(this Road road, MovementDirection direction)
 => road.GetStartingPointFor(direction).DistanceToOppositeLocation;
示例#3
0
 public static LocationId GetArrivalLocationId(this Road road, MovementDirection direction)
 => road.GetArrivalPointFor(direction).LocationId;
示例#4
0
 public static RoadPoint GetArrivalPointFor(this Road road, MovementDirection direction)
 => road.GetStartingPointFor(direction.Flip());