コード例 #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());