Beispiel #1
0
    private string UpdateRoadName(ClassificationIndex index, out string roadType)
    {
        if (index == ClassificationIndex.Highway)
        {
            roadType = (highwayRoadLetter + ++highwayRoadCount);
        }
        else if (index == ClassificationIndex.Primary)
        {
            roadType = (primaryRoadLetter + ++primaryRoadCount);
        }
        else if (index == ClassificationIndex.Secondary)
        {
            roadType = (secondaryRoadLetter + ++secondaryRoadCount);
        }
        else if (index == ClassificationIndex.Other)
        {
            roadType = (otherRoadLetter + ++otherRoadCount);
        }
        else
        {
            roadType = "";
        }

        return(roadName + " " + roadType);
    }
Beispiel #2
0
 private void OnRoadClassificationChange(Toggle toggle)
 {
     if (toggle.isOn)
     {
         if (toggle == highwayButton)
         {
             classificationIndex = ClassificationIndex.Highway;
         }
         else if (toggle == primaryButton)
         {
             classificationIndex = ClassificationIndex.Primary;
         }
         else if (toggle == secondaryButton)
         {
             classificationIndex = ClassificationIndex.Secondary;
         }
         else if (toggle == otherButton)
         {
             classificationIndex = ClassificationIndex.Other;
         }
     }
 }