Пример #1
0
        public void Resume()
        {
            if (!canResume)
            {
                return;
            }

            IsResuming = true;
            PauseOverlay.Hide();

            // breaks and time-based conditions may allow instant resume.
            if (breakOverlay.IsBreakTime.Value)
            {
                completeResume();
            }
            else
            {
                DrawableRuleset.RequestResume(completeResume);
            }

            void completeResume()
            {
                GameplayClockContainer.Start();
                IsResuming = false;
            }
        }
Пример #2
0
        public void Resume()
        {
            if (!canResume)
            {
                return;
            }

            IsResuming = true;
            PauseOverlay.Hide();

            // breaks and time-based conditions may allow instant resume.
            double time = GameplayClockContainer.GameplayClock.CurrentTime;

            if (Beatmap.Value.Beatmap.Breaks.Any(b => b.Contains(time)) || time < Beatmap.Value.Beatmap.HitObjects.First().StartTime)
            {
                completeResume();
            }
            else
            {
                DrawableRuleset.RequestResume(completeResume);
            }

            void completeResume()
            {
                GameplayClockContainer.Start();
                IsResuming = false;
            }
        }