예제 #1
0
        void Update()
        {
            if (!hasStarted || isPaused || hasEnded)
            {
                return;
            }

            midiSequencer.AdvanceTime(Time.deltaTime * playbackSpeed);
            ticks = midiSequencer.ticks;

            if (ticks >= endTicks)
            {
                hasEnded = true;
                EndGame();
                return;
            }

            UpdateBackgroundNotes();

            gameplayManager.GenerateBlocks();

#if UNITY_EDITOR || UNITY_STANDALONE
            ProcessMouse();
#else
            ProcessTouches();
#endif

            if (keyboardMode)
            {
                ProcessKeyboard();
            }

            gameplayManager.UpdateBlocks();

            scoringManager.SetProgress(ticks / sequenceCollection.end);

            sf2Synth.Panic();
        }