コード例 #1
0
 public void Reset()
 {
     // Rewind and remove additional workers
     MainWorker.Rewind();
     AdditionalWorkers.Clear();
     Scene.Characters.Clear();
 }
コード例 #2
0
        public void Update()
        {
            if (_lastDt == null)
            {
                return;
            }

            var passedMs = (int)(DateTime.Now - _lastDt.Value).TotalMilliseconds;

            MainWorker.Update(passedMs);

            foreach (var worker in AdditionalWorkers)
            {
                worker.Update(passedMs);
            }

            AdditionalWorkers.RemoveAll(w => w.Finished);

            _lastDt = DateTime.Now;
        }