예제 #1
0
 private Colony(ColonyStats stats, ColonyParams par, ColonyProduction prod, double water)
 {
     _stats      = stats;
     _production = prod;
     _freeWater  = water;
     _params     = par;
 }
예제 #2
0
        public SimulationController()
        {
            model.PlanetCondition.PlanetConditionState state = new model.PlanetCondition.PlanetConditionState
            {
                freeWater = 0,
                organic   = 0,
                co        = 23830000000000000,
                n         = 675000000000000,
                oxigen    = 32500000000000,
                //TODO temperature
                temperature = -40
            };

            model.ColonyStats stats = new model.ColonyStats
            {
                num  = 10,
                mass = 10
            };

            model.ColonyParams par = ParamsController.colonyParams;

            model.PlanetCondition contitions = new model.PlanetCondition(state, ParamsController.growthSpeed);
            model.Colony          colony     = new model.Colony(stats, par);

            _currentColony = colony;
            _conditions    = contitions;
            defaultTemp    = _conditions.getTemperature();
        }
 public void StartSimulation()
 {
     model.ColonyParams modelParams = new model.ColonyParams();
     modelParams.radiationResistent           = 0.98f + _bacteria.radiationResist / 100000;
     modelParams.optimalTemperature           = (int)_bacteria.temperatureResist;
     modelParams.photosynthesisPower          = _bacteria.photosynthesisPower / 100;
     modelParams.nFixPower                    = _bacteria.nitrogenPower / 100;
     modelParams.cellSize                     = _bacteria.maxSize;
     controller.ParamsController.colonyParams = modelParams;
     controller.ParamsController.growthSpeed  = (int)_bacteria.divisionSpeed;
     SceneManager.LoadScene("simulation");
 }
예제 #4
0
 public Colony(ColonyStats stats, ColonyParams par)
 {
     _stats  = stats;
     _params = par;
 }