public void Update(NumberGenerator generator) { UnityEngine.Debug.Log("DigitObserver:" + generator.getNumber()); }
/*! * \brief Execute everything about simulation into the Medium */ public void Update() { if (enableShufflingReactionOrder) { LinkedListExtensions.Shuffle <IReaction>(_reactions); } foreach (IReaction reaction in _reactions) { if (Logger.isLevel(Logger.Level.TRACE)) { PromoterReaction promoter = reaction as PromoterReaction; if (promoter != null) { Logger.Log("Medium::Update reaction.react(" + _molecules + ") with reaction=" + reaction, Logger.Level.TRACE); } } reaction.react(_molecules); } applyVariation(); if (_enableNoise) { float noise; foreach (Molecule m in _molecules) { noise = _numberGenerator.getNumber(); if (_enableSequential) { m.addConcentration(noise); } else { m.addNewConcentration(noise); } } } //TODO improve check that it's the medium of the hero bacterium Cellia //TODO refactor interactions out of medium if (_name == "Cellia") { manageMoleculeConcentrationWithKey("AMPI"); if (GameStateController.isAdminMode) { //TODO manage this differently manageMoleculeConcentrationWithKey("AMPR"); manageMoleculeConcentrationWithKey("ATC"); manageMoleculeConcentrationWithKey("FLUO1"); manageMoleculeConcentrationWithKey("FLUO2"); manageMoleculeConcentrationWithKey("IPTG"); manageMoleculeConcentrationWithKey("MOV"); manageMoleculeConcentrationWithKey("REPR1"); manageMoleculeConcentrationWithKey("REPR2"); manageMoleculeConcentrationWithKey("REPR3"); manageMoleculeConcentrationWithKey("REPR4"); } } }