示例#1
0
 private void SetScrollPointerPreciseFrameIndex(AudioComponent.PlaySession playSession, FrameManagerComponent frameManager, SubdivisionComponent subdivision)
 {
     SetScrollPointerPreciseFrameIndex(
         playSession.CurrentIndexesAndProgress.PreciseFrameIndex,
         frameManager.GetCurrentFrameWidth(),
         subdivision.CurrentSubdivision.QuantityPerBeat);
 }
示例#2
0
 public void Scroll(AudioComponent.PlaySession playSession)
 {
     //Game.Log(Logging.Category.BEATMAP, "Beginning piano roll scroll.", Logging.Level.LOG);
     if (IsScrolling)
     {
         StopCoroutine(_scrollCoroutine);
     }
     _scrollCoroutine = StartCoroutine(ScrollCoroutine(playSession));
 }
示例#3
0
        private IEnumerator ScrollCoroutine(AudioComponent.PlaySession playSession)
        {
            // Maybe a 'do while' would be cleaner

            var frameManager         = Editor.FrameManagerComponent;
            var subdivisionComponent = Editor.SubdivisionComponent;

            while (!playSession.Complete)
            {
                SetScrollPointerPreciseFrameIndex(playSession, frameManager, subdivisionComponent);
                yield return(null);  //come back next frame
            }

            SetScrollPointer(GetScrollPositionForFrameIndex(playSession.EndFrameIndex + 1, frameManager.GetCurrentFrameWidth(), subdivisionComponent.CurrentSubdivision.QuantityPerBeat));
        }