Exemple #1
0
 public void ProcessFacts(object data)
 {
     lock (_lock)
     {
         Thread thread = new Thread(
             (state) => FactReader.GetAllFactsAsync(_factQueue, Signal)
             );
         _threads.Add(new Tuple <Thread, IThread>(thread, FactReader));
         thread.Start();
         thread = new Thread(
             (state) => MapWriter.PostProductionStopsAsync(_mapQueue, Signal)
             );
         _threads.Add(new Tuple <Thread, IThread>(thread, MapWriter));
         thread.Start();
         thread = new Thread(
             (state) => FactMapper.CalcProductionStopsAsync(_factQueue, _mapQueue, Signal)
             );
         _threads.Add(new Tuple <Thread, IThread>(thread, FactMapper));
         thread.Start();
     }
     while (_running)
     {
         _waitHandle.WaitOne();
     }
 }
Exemple #2
0
        private void ImprovedTemp(string file)
        {
            Assembly assembly = Assembly.LoadFrom("RhythmBox.Window.Resources.dll");

            if (assembly == null)
            {
                throw new Exception($"{nameof(assembly)} can not be null!");
            }

            var lines = ReadLines(() => assembly.GetManifestResourceStream("RhythmBox.Window.Resources.Difficulty1.ini") !, Encoding.UTF8).ToList();

            var map = new MapWriter();

            new MapReader(lines).CopyAllTo <IMap>(map);
            map.WriteToNewMap(file);
        }
Exemple #3
0
 void Awake()
 {
     s_Sigleton = this;
 }