public void Generate()
        {
            Working = true;

            _currentCreator?.CleanUp();

            _currentCreator = GenerateNew();
            _currentCreator.SetUp();

            _stopwatch = Stopwatch.StartNew();
            _currentCreator.Run();

            MainThreadDispatch.Instance().Enqueue(() => { Working = false; });

            StartCoroutine(FinishWork());
        }
Beispiel #2
0
        protected override IEnumerator MainWork(bool firstRun = false, bool measure = true)
        {
            TerrainCreator.SetUp();
            if (measure)
            {
                using (Measure.Scope(new SampleGroupDefinition(
                                         Common.DefinitionName(TerrainCreator.GetType().Name, firstRun ? Common.FirstKeyWord : string.Empty),
                                         TestSettings.SampleUnit)))
                {
                    TerrainCreator.Run();
                }
            }
            else
            {
                TerrainCreator.Run();
            }

            yield return(null);

            TerrainCreator.CleanUp();
        }
Beispiel #3
0
 private void RunStatement()
 {
     TerrainCreator.Run();
 }
Beispiel #4
0
 private IEnumerator RunStatement()
 {
     TerrainCreator.Run();
     MainThreadDispatch.Instance().Enqueue(() => { _working = false; });
     yield return(new WaitWhile(() => _working));
 }
Beispiel #5
0
 public void Run()
 {
     Working = true;
     _currentCreator?.Run();
     Working = false;
 }