Esempio n. 1
0
    public void HandleDropDownSelection(int index)
    {
        switch (index)
        {
        case 0:
            BacteriaFactory.SetCellRegulatorType(RegulatorType.ODE);
            break;

        case 1:
            BacteriaFactory.SetCellRegulatorType(RegulatorType.Delta);
            break;
        }
    }
Esempio n. 2
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();
    }