private void OnWillCreateSegment(WillCreateSegmentArgs args)
 {
     // Set the width of the road segments.
     args.Style = new SegmentStyle.Builder(args.Style)
     {
         Width = RoadWidth
     }.Build();
 }
Exemplo n.º 2
0
 private void OnWillCreateSegment(WillCreateSegmentArgs args)
 {
     // Set the width of road and non-road segments.
     args.Style = new SegmentStyle.Builder(args.Style)
     {
         Width = Vehicle.IsTraversableRoad(args.MapFeature) ? RoadWidth : RoadWidth / 2
     }.Build();
 }
Exemplo n.º 3
0
 /// <summary>
 /// Checks Metadata, and assigns a new material to any road that is marked as private.
 /// </summary>
 /// <param name="args">Segment creation event arguments.</param>
 private void WillCreateHandler(WillCreateSegmentArgs args)
 {
     if (args.MapFeature.Metadata.IsPrivate)
     {
         // If the segment that is being created is marked private, change the material in the style
         // used to display the segment.
         SegmentStyle.Builder style = args.Style.AsBuilder();
         style.Material = PrivateRoadMaterial;
         args.Style     = style.Build();
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Handle <see cref="SegmentEvents.WillCreate"/> event by specifying the segment styles.
 /// </summary>
 /// <param name="args">Event arguments.</param>
 public void HandleWillCreateSegment(WillCreateSegmentArgs args)
 {
     args.Style = GameObjectOptions.SegmentStyle;
 }
Exemplo n.º 5
0
 /// <summary>
 /// Triggered by the Maps SDK during the loading process.
 /// Notifies the SDK if the GameObject for segments needs to be created (or not) based on the
 /// value of the UI flag.
 /// </summary>
 void OnWillCreateSegment(WillCreateSegmentArgs args)
 {
     args.Cancel = !ShowSegments;
 }
Exemplo n.º 6
0
 /// <summary>
 /// Handle <see cref="SegmentEvents.WillCreate"/> event by specifying the segment styles.
 /// </summary>
 public void HandleWillCreateSegment(WillCreateSegmentArgs arguments)
 {
     arguments.Style = _mapDefaultStyle.SegmentStyle;
 }