Ejemplo n.º 1
0
        private void AddVehicleRandom()
        {
            for (int i = 0; i < 4; ++i)
            {
                if (RandomSpawnNow())
                {
                    Driver       driver       = WorldDrivers.GetRandomDriver();
                    VehicleSpecs vehicleSpecs = VehicleModels.GetRandomCar();
                    foreach (Junction junction in Junctions)
                    {
                        junction.Simulation.Roads[i].LeftLane.AddVehicleManual(driver, vehicleSpecs);
                    }
                }

                if (RandomSpawnNow())
                {
                    Driver       driver       = WorldDrivers.GetRandomDriver();
                    VehicleSpecs vehicleSpecs = VehicleModels.GetRandomCar();
                    foreach (Junction junction in Junctions)
                    {
                        junction.Simulation.Roads[i].RightLane.AddVehicleManual(driver, vehicleSpecs);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        private void addVehicleWESTRToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Driver       driver       = WorldDrivers.GetRandomDriver();
            VehicleSpecs vehicleSpecs = VehicleModels.GetRandomCar();

            foreach (Junction junction in Junctions)
            {
                junction.Simulation.Roads[3].RightLane.AddVehicleManual(driver, vehicleSpecs);
            }
        }
Ejemplo n.º 3
0
        private void mstrip_addWest_Click(object sender, EventArgs e)
        {
            Driver       driver       = WorldDrivers.GetRandomDriver();
            VehicleSpecs vehicleSpecs = VehicleModels.GetRandomCar();

            foreach (Junction junction in Junctions)
            {
                junction.Simulation.Roads[3].LeftLane.AddVehicleManual(driver, vehicleSpecs);
            }
        }