void OnBMSLoaded() { bmsEvents = bmsManager.LoadedChart.Events; if (preQueueMapper != null) { preQueueMapper.BMSEvent -= OnHasKeyFrame; } preQueueMapper = bmsManager.LoadedChart.GetEventDispatcher(); preQueueMapper.BMSEvent += OnHasKeyFrame; preQueueMapper.Seek(TimeSpan.MinValue, false); if (postQueueMapper != null) { postQueueMapper.BMSEvent -= OnPostMap; } postQueueMapper = bmsManager.LoadedChart.GetEventDispatcher(); postQueueMapper.BMSEvent += OnPostMap; postQueueMapper.Seek(TimeSpan.MinValue, false); foreach (var channel in bmsManager.GetAllChannelIds()) { if (!bmsManager.GetAllAdoptedChannels().Contains(channel)) { continue; } GetChannelQueue(channel).Clear(); } }