//update output (ie set values in simulator) private void updateOutput(CellInstance cell, StateSnapshot state) { SpeciesReference speciesRef = this.getSpeciesReference(0, ComponentLinkType.Output); NutrientField attractant = state.SimulationEnvironment.GetNutrientFieldObject(nutrientIndex); float amount = attractant.GetNutrientLevel(cell.CellInstanceSpatialContext.Position); cell.setSpeciesAmountInSimulation(speciesRef.species.ID,amount / 10 ); cell.setSpeciesAmount(speciesRef.species.ID, amount / 10); }