AbstractedSheep.ShuttleTrackerWorld.World.AddRoute C# (CSharp) Метод

AddRoute() приватный Метод

private AddRoute ( int routeId, string name, List coords ) : void
routeId int
name string
coords List
Результат void
        private void AddRoute(int routeId, string name, List<Coordinate> coords)
        {
            Route r = new Route(routeId, name, coords);
            this.routes.Add(r.Id, r);
        }

Same methods

World::AddRoute ( RouteJson route ) : void

Usage Example

Пример #1
0
        /// <summary>
        /// Create a world object from a Netlink object.
        /// </summary>
        /// <param name="n">The Netlink class that represents the Netlink JSON.</param>
        /// <returns>A world generated from the Netlink.</returns>
        public static World GenerateWorld(Netlink n)
        {
            World w = new World();

            foreach (RouteJson r in n.routes)
            {
                w.AddRoute(r);
            }

            foreach (StopJson s in n.stops)
            {
                w.AddStop(s);
            }

            return(w);
        }
All Usage Examples Of AbstractedSheep.ShuttleTrackerWorld.World::AddRoute