public loadMediumsFromFile ( string filePath ) : LinkedList |
||
filePath | string | |
리턴 | LinkedList |
//! This function is called at the initialisation of the simulation (like a Constructor) public void Awake() { FileLoader fileLoader = new FileLoader(); _reactionsSets = new LinkedList<ReactionsSet>(); _moleculesSets = new LinkedList<MoleculesSet>(); _mediums = new LinkedList<Medium>(); foreach (string file in _reactionsFiles) LinkedListExtensions.AppendRange<ReactionsSet>(_reactionsSets, fileLoader.loadReactionsFromFile(file)); foreach (string file in _moleculesFiles) LinkedListExtensions.AppendRange<MoleculesSet>(_moleculesSets, fileLoader.loadMoleculesFromFile(file)); MediumLoader mediumLoader = new MediumLoader(); foreach (string file in _mediumsFiles) LinkedListExtensions.AppendRange<Medium>(_mediums, mediumLoader.loadMediumsFromFile(file)); foreach (Medium medium in _mediums) { medium.Init(_reactionsSets, _moleculesSets); medium.enableSequential(enableSequential); medium.enableNoise(enableNoise); medium.enableEnergy(enableEnergy); medium.enableShufflingReactionOrder = enableShufflingReactionOrder; } _fick = new Fick(); _fick.loadFicksReactionsFromFiles(_fickFiles, _mediums); _activeTransport = new ActiveTransport(); _activeTransport.loadActiveTransportReactionsFromFiles(_activeTransportFiles, _mediums); }
//! This function is called at the initialisation of the simulation (like a Constructor) public void Awake() { FileLoader fileLoader = new FileLoader(); _reactionsSets = new LinkedList<ReactionsSet>(); _moleculesSets = new LinkedList<MoleculesSet>(); _mediums = new LinkedList<Medium>(); foreach (string file in _reactionsFiles) LinkedListExtensions.AppendRange<ReactionsSet>(_reactionsSets, fileLoader.loadReactionsFromFile(file)); foreach (string file in _moleculesFiles) LinkedListExtensions.AppendRange<MoleculesSet>(_moleculesSets, fileLoader.loadMoleculesFromFile(file)); MediumLoader mediumLoader = new MediumLoader(); foreach (string file in _mediumsFiles) LinkedListExtensions.AppendRange<Medium>(_mediums, mediumLoader.loadMediumsFromFile(file)); foreach (Medium medium in _mediums) medium.Init(_reactionsSets, _moleculesSets); _fick = new Fick(); _fick.loadFicksReactionsFromFiles(_fickFiles, _mediums); _activeTransport = new ActiveTransport(); _activeTransport.loadActiveTransportReactionsFromFiles(_activeTransportFiles, _mediums); }