void Update() { if (bmsManager.IsStarted && !bmsManager.IsPaused) { TimeSpan timePosition = bmsManager.TimePosition; preQueueMapper.Seek(timePosition + startTimeOffset); postQueueMapper.Seek(timePosition + endTimeOffset); } }
void Update() { if (bmsManager.IsStarted && !bmsManager.IsPaused) { TimeSpan timePosition = bmsManager.TimePosition; preQueueMapper.Seek(timePosition + startTimeOffset); postQueueMapper.Seek(timePosition + endTimeOffset); if (Input.GetAxis("Cancel") > 0) { bmsManager.IsPaused = true; } } }
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(); } }
void Update() { if (isStarted && !isPaused) { var now = DateTime.Now; timePosition = now - startTime + preOffset; TimeSpan calculatedTimePosition = TimePosition; mainTimingHelper.Seek(calculatedTimePosition); preTimingHelper.Seek(calculatedTimePosition + Scale(preEventOffset, Math.Max(1, 130 / chart.MinBPM))); foreach (var ln in lnHolders.Values) { ln.Update(calculatedTimePosition); } if (OnBeatFlow != null) { float beatFlow = (calculatedTimePosition - bpmBasePoint).ToAccurateMinuteF() * bpm + bpmBasePointBeatFlow; OnBeatFlow.Invoke(Mathf.Repeat(beatFlow, 1), Mathf.Repeat(beatFlow, currentTimeSignature)); } if (timePosition > endTimeTheshold && soundPlayer.Polyphony <= 0) { IsStarted = false; } } }