Esempio n. 1
0
 public void Load(RoadContainer[] roadNames)
 {
     if (roadNames != null)
     {
         m_roads = roadNames;
         Initialise();
     }
 }
Esempio n. 2
0
 public void Load(RoadContainer[] roadNames)
 {
     if (roadNames != null)
     {
         foreach (RoadContainer road in roadNames)
         {
             m_roadDict[road.m_segmentId] = road;
         }
     }
     else
     {
         LoggerUtilities.LogError("Something went wrong loading the road names!");
     }
 }
Esempio n. 3
0
 public void SetRoadName(ushort segmentId, string name)
 {
     RoadContainer container = new RoadContainer( segmentId, name );
     m_roadDict[segmentId] = container;
 }
Esempio n. 4
0
        public void SetRoadName(ushort segmentId, string name)
        {
            bool foundRoad = false;

            foreach (RoadContainer road in m_roadList)
            {
                if (road.m_segmentId == segmentId)
                {
                    road.m_roadName = name;
                    foundRoad = true;
                }
            }

            if(!foundRoad)
            {
                RoadContainer newRoad = new RoadContainer();
                newRoad.m_roadName = name;
                newRoad.m_segmentId = segmentId;
                newRoad.m_textObject = new GameObject();
                newRoad.m_textMesh = newRoad.m_textObject.AddComponent<TextMesh>();

                m_roadList.Add(newRoad);
            }

            //Save();
        }
Esempio n. 5
0
        public void SetRoadName(ushort segmentId, string name)
        {
            bool foundRoad = false;

            foreach (RoadContainer road in m_roadList)
            {
                if (road.m_segmentId == segmentId)
                {
                    road.m_roadName = name;
                    foundRoad = true;
                }
            }

            if(!foundRoad)
            {
                RoadContainer newRoad = new RoadContainer();
                newRoad.m_roadName = name;
                newRoad.m_segmentId = segmentId;

                m_roadList.Add(newRoad);
            }

            //Save();
        }