Esempio n. 1
0
        protected override bool OnExiting(Screen next)
        {
            if (onCompletionEvent != null)
            {
                // Proceed to result screen if beatmap already finished playing
                onCompletionEvent.RunTask();
                return(true);
            }

            if ((!AllowPause || HasFailed || !ValidForResume || pauseContainer?.IsPaused != false || RulesetContainer?.HasReplayLoaded != false) && (!pauseContainer?.IsResuming ?? true))
            {
                // In the case of replays, we may have changed the playback rate.
                applyRateFromMods();

                fadeOut();
                return(base.OnExiting(next));
            }

            if (LoadedBeatmapSuccessfully)
            {
                pauseContainer?.Pause();
            }

            return(true);
        }
Esempio n. 2
0
        protected override bool OnExiting(Screen next)
        {
            if (HasFailed || !ValidForResume || pauseContainer?.AllowExit != false || HitRenderer?.HasReplayLoaded != false)
            {
                fadeOut();
                return(base.OnExiting(next));
            }

            pauseContainer.Pause();
            return(true);
        }
Esempio n. 3
0
        protected override bool OnExiting(Screen next)
        {
            if (HasFailed || !ValidForResume || pauseContainer?.AllowExit != false || RulesetContainer?.HasReplayLoaded != false)
            {
                fadeOut();
                return(base.OnExiting(next));
            }

            if (loadedSuccessfully)
            {
                pauseContainer.Pause();
            }

            return(true);
        }
Esempio n. 4
0
        protected override bool OnExiting(Screen next)
        {
            if (!AllowPause || HasFailed || !ValidForResume || pauseContainer?.IsPaused != false || RulesetContainer?.HasReplayLoaded != false)
            {
                // In the case of replays, we may have changed the playback rate.
                applyRateFromMods();

                fadeOut();
                return(base.OnExiting(next));
            }

            if (loadedSuccessfully)
            {
                pauseContainer.Pause();
            }

            return(true);
        }