private IEnumerator LoadBms() { yield return(new WaitUntil(() => BMSCapacity.Instance.IsDone)); _bms = BMSCapacity.Instance; _bpms = (SortQueue <BPM>)_bms.BPMs.Clone(); while (!NodeCreator.Instance._doneLoading) { yield return(null); } _isDone = true; }
protected override bool Awake() { if (!base.Awake()) { return(false); } MeasureOffset = new Dictionary <int, float>(); Beats = new Dictionary <int, float>(); BPMs = new SortQueue <BPM>(); Stops = new SortQueue <Stop>(); Notes = new SortQueue <Note>(); BGMs = new SortQueue <Note>(); Bmps = new SortQueue <Bmp>(); StartCoroutine(StartParsing()); StartCoroutine(GameDoneCheck()); return(true); }
public ActionResult ScanSort() { string path = @"S:\"; using (DB conn = new DB()) { foreach (string _path in Directory.GetFiles(path)) { FileInfo info = new FileInfo(_path); var a = conn.SortQueue.Where(x => x.FilePath == _path).Count(); if (a == 0) { SortQueue _new = new SortQueue { Classification = "Sort", ClassificationDate = DateTime.Now.Date.ToString(), FileName = info.Name, FilePath = _path, ShowDrive = null, ShowName = null, ShowSeason = null }; try { conn.SortQueue.Add(_new); conn.SaveChanges(); } catch (Exception ex) { throw new Exception(ex.Message); } } } } return(View("ViewSort")); }