Beispiel #1
0
    void onNewTopologyLoaded(SavedTopologyData savedTopologyData)
    {
        if (savedTopologyData != null && savedTopologyData.TopologyData != null && savedTopologyData.CarSimpleData != null)
        {
            NetworkTopologySimpleData newTopology = savedTopologyData.TopologyData;
            geneticsManager.SetNetworkTopology(newTopology);
            geneticsManager.ResetSimulation();
            geneticsManager.SetNewCars(savedTopologyData.CarSimpleData);
            geneticsManager.ResetCars();
            geneticsManager.ActivateCars();

            geneticsUIController.RefreshViews();
        }
    }
 void onResetAllCarsConfirmed(bool confirmed)
 {
     if (confirmed)
     {
         geneticsManager.ResetSimulation();
         geneticsManager.ActivateCars();
         RefreshViews();
     }
 }