void Start() { startingAge = Map.minutes; _tracker = chromosome.MutationTracker; _viewChromosome = chromosome.ToString(); cells = new CellsStructure(); bodyEnergy = OrganismSetter.BodyEnergy(chromosome); orderOfGrowth = CellsCreator.GetOrderOfGrowth(this); OrganismSetter.SetNeuralNetwork(this); OrganismSetter.SetDrag(this); OrganismSetter.SetName(this); OrganismCellsGrowth.GrowCell(this, false); if (fullyGrow) { OrganismCellsGrowth.FullyGrow(this); } InvokeRepeating("Routine", 2f, 5f); InvokeRepeating("Think", 2f, SimulationParameters.brainTick); InvokeRepeating("Physics", 2f, SimulationParameters.physics); }
private void Grow() { int number = (int)Math.Sqrt(cells.Count()); for (int i = 0; i < number; i++) {//grow a number of cells based on the number that are already alive OrganismCellsGrowth.GrowCell(this, false); } OrganismHealthCheck.KillDeatachedCells(cells); }