コード例 #1
0
        // /test

        internal static void SpawnCar(/*CarModel carModel*/)
        {
            var carView = ElementViewProducer.CreateCarView(/*carModel*/);
            var car     = ElementPictureBoxProducer.CreateCarPictureBox(carView);

            // Some Distribution law here
            if (Rnd.NextDouble() <= ModelSettings.TrafficFlow.ProbabilityOfStoppingAtGasStation)
            {
                car.IsGoesFilling = true;
            }
            //carView.IsGoesFilling = true;


            if (!car.IsGoesFilling)
            {
                car.AddDestinationPoint(DestinationPointsDefiner.LeavePointNoFilling);
            }
        }
コード例 #2
0
        internal static void SpawnCollector()
        {
            var collectorView = ElementViewProducer.CreateCollectorView();

            ElementPictureBoxProducer.CreateCollectorPictureBox(collectorView);
        }
コード例 #3
0
 internal static void SpawnRefueller(FuelTankView fuelTank)
 {
     var refuellerView = ElementViewProducer.CreateRefuellerView(fuelTank);
     var refueller     = ElementPictureBoxProducer.CreateRefuellerPictureBox(refuellerView);
 }