Esempio n. 1
0
    // Dropdown
    private void Start()
    {
        // Create basic listeners for various elements
        simulateButton.onClick.AddListener(StartSimulation);
        i0Slider.onValueChanged.AddListener(delegate { EnvValueChanged(); });
        dSlider.onValueChanged.AddListener(delegate { EnvValueChanged(); });
        sourcesSlider.onValueChanged.AddListener(delegate { EnvValueChanged(); });
        nOfCellsSlider.onValueChanged.AddListener(delegate { CellValueChanged(); });
        nOfIterations.onValueChanged.AddListener(delegate { CellValueChanged(); });
        forwardSim.onValueChanged.AddListener(delegate { CellValueChanged(); });
        quitButton.onClick.AddListener(Quit);

        model = Model.GetInstance();

        BacteriaFactory.SetCellIterations(500);
        BacteriaFactory.SetCellDeathAndDivision(true);
        BacteriaFactory.SetCellRegulatorType(RegulatorType.ODE);

        //added just to make the program a lot less anoying to use

        createBasicEnv(i0, d);
        EnvValueChanged(); // bug fix for first value change
        CellValueChanged();
    }
Esempio n. 2
0
 public void SetCellDeathDivision(bool status)
 {
     BacteriaFactory.SetCellDeathAndDivision(status);
 }